--- /dev/null
+/*
+ * Copyright(c) 2019 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;
+
+namespace Tizen.NUI
+{
+ internal static class ArgumentHelper
+ {
+ public static void RequireNotNull(object value, string argumentName)
+ {
+ if (null == value)
+ {
+ throw new ArgumentException("The value can't be null or empty", argumentName);
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2019 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;
+using System.Linq;
+using System.Reflection;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Enum help class.
+ /// </summary>
+ internal static class EnumHelper
+ {
+ /// <summary>
+ /// Get the description from the numeric value.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="value"></param>
+ /// <returns>The description of the numeric value.</returns>
+ public static string GetDescription<T>(this T value) where T : struct
+ {
+ string result = value.ToString();
+ FieldInfo info = typeof(T).GetField(result);
+ var attributes = info.GetCustomAttributes(typeof(DescriptionAttribute), true);
+ if (null != attributes?.FirstOrDefault())
+ {
+ result = (attributes.First() as DescriptionAttribute).Description;
+ }
+
+ return result;
+ }
+
+ /// <summary>
+ /// Get the numeric value from the description.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="description"></param>
+ /// <returns>The numeric value.</returns>
+ public static T GetValueByDescription<T>(this string description) where T : struct
+ {
+ Type type = typeof(T);
+ foreach (var field in type.GetFields())
+ {
+ if (description == field.Name)
+ {
+ return (T)field.GetValue(null);
+ }
+
+ var attributes = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), true);
+ if (null != attributes?.FirstOrDefault())
+ {
+ if (description == attributes.First().Description)
+ {
+ return (T)field.GetValue(null);
+ }
+ }
+ }
+
+ throw new ArgumentException($"{description} can't be found.", "Description");
+ }
+
+ /// <summary>
+ /// Get the numeric value from string representation of the name.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="value"></param>
+ /// <returns>The numeric value.</returns>
+ public static T GetValue<T>(this string value) where T : struct
+ {
+ T result;
+ if (Enum.TryParse(value, true, out result))
+ {
+ return result;
+ }
+
+ throw new ArgumentException($"{value} can't be found.", "Value");
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2019 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.Runtime.InteropServices;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI
+{
+ internal static class Extensions
+ {
+ public static T GetInstanceSafely<T>(this object wrapper, IntPtr cPtr) where T : BaseHandle
+ {
+ HandleRef CPtr = new HandleRef(wrapper, cPtr);
+ T ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as T;
+ Interop.BaseHandle.delete_BaseHandle(CPtr);
+ CPtr = new HandleRef(null, IntPtr.Zero);
+ return ret;
+ }
+ }
+}
/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
{
//to fix memory leak issue, match the handle count with native side.
global::System.IntPtr cPtr = Interop.FrameBuffer.FrameBuffer_GetColorTexture(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Texture ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Texture;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ Texture ret = this.GetInstanceSafely<Texture>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
}
}
- public static float ParentOriginTop
- {
- get
- {
- float ret = Interop.NDalicParentOrigin.ParentOriginTop_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float ParentOriginBottom
- {
- get
- {
- float ret = Interop.NDalicParentOrigin.ParentOriginBottom_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float ParentOriginLeft
- {
- get
- {
- float ret = Interop.NDalicParentOrigin.ParentOriginLeft_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float ParentOriginRight
- {
- get
- {
- float ret = Interop.NDalicParentOrigin.ParentOriginRight_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float ParentOriginMiddle
- {
- get
- {
- float ret = Interop.NDalicParentOrigin.ParentOriginMiddle_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginTopLeft
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopLeft_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginTopCenter
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopCenter_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginTopRight
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginTopRight_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginCenterLeft
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterLeft_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginCenter
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenter_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginCenterRight
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginCenterRight_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginBottomLeft
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomLeft_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginBottomCenter
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomCenter_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 ParentOriginBottomRight
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicParentOrigin.ParentOriginBottomRight_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float AnchorPointTop
- {
- get
- {
- float ret = Interop.NDalicAnchorPoint.AnchorPointTop_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float AnchorPointBottom
- {
- get
- {
- float ret = Interop.NDalicAnchorPoint.AnchorPointBottom_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float AnchorPointLeft
- {
- get
- {
- float ret = Interop.NDalicAnchorPoint.AnchorPointLeft_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float AnchorPointRight
- {
- get
- {
- float ret = Interop.NDalicAnchorPoint.AnchorPointRight_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static float AnchorPointMiddle
- {
- get
- {
- float ret = Interop.NDalicAnchorPoint.AnchorPointMiddle_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointTopLeft
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopLeft_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointTopCenter
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopCenter_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointTopRight
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopRight_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointCenterLeft
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterLeft_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointCenter
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenter_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointCenterRight
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterRight_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointBottomLeft
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomLeft_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointBottomCenter
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomCenter_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- public static Vector3 AnchorPointBottomRight
- {
- get
- {
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomRight_get();
- Vector3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector3(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
public static Vector4 BLACK
{
get
namespace Tizen.NUI
{
using Tizen.NUI.BaseComponents;
- internal class RotationGestureDetectedSignal : global::System.IDisposable
+ internal class RotationGestureDetectedSignal : Disposable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- //A Flag to check who called Dispose(). (By User or DisposeQueue)
- private bool isDisposeQueued = false;
- //A Flat to check if it is already disposed.
- protected bool disposed = false;
-
-
- ~RotationGestureDetectedSignal()
- {
- if (!isDisposeQueued)
- {
- isDisposeQueued = true;
- DisposeQueue.Instance.Add(this);
- }
- }
-
- public void Dispose()
- {
- //Throw excpetion if Dispose() is called in separate thread.
- if (!Window.IsInstalled())
- {
- throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
- }
-
- if (isDisposeQueued)
- {
- Dispose(DisposeTypes.Implicit);
- }
- else
- {
- Dispose(DisposeTypes.Explicit);
- System.GC.SuppressFinalize(this);
- }
- }
-
- protected virtual void Dispose(DisposeTypes type)
+ protected override void Dispose(DisposeTypes type)
{
if (disposed)
{
return;
}
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- }
-
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
- disposed = true;
+ base.Dispose(type);
}
public bool Empty()
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
-
}
-
}
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
{
//to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = Interop.ViewWrapperImpl.ViewWrapperImpl_GetVisual(swigCPtr, index);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as VisualBase;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ VisualBase ret = this.GetInstanceSafely<VisualBase>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
*
*/
+using System.ComponentModel;
+
namespace Tizen.NUI
{
/// <summary>
/// Linear.
/// </summary>
+ [Description("DEFAULT")]
Default,
/// <summary>
/// No transformation.
/// </summary>
+ [Description("LINEAR")]
Linear,
/// <summary>
/// Reverse linear.
/// </summary>
+ [Description("REVERSE")]
Reverse,
/// <summary>
/// Speeds up and comes to a sudden stop (square).
/// </summary>
+ [Description("EASE_IN_SQUARE")]
EaseInSquare,
/// <summary>
/// Sudden start and slows to a gradual stop (square).
/// </summary>
+ [Description("EASE_OUT_SQUARE")]
EaseOutSquare,
/// <summary>
/// Speeds up and comes to a sudden stop (cubic).
/// </summary>
+ [Description("EASE_IN")]
EaseIn,
/// <summary>
/// Sudden start and slows to a gradual stop (cubic).
/// </summary>
+ [Description("EASE_OUT")]
EaseOut,
/// <summary>
/// Speeds up and slows to a gradual stop (cubic).
/// </summary>
+ [Description("EASE_IN_OUT")]
EaseInOut,
/// <summary>
/// Speeds up and comes to a sudden stop (sinusoidal).
/// </summary>
+ [Description("EASE_IN_SINE")]
EaseInSine,
/// <summary>
/// Sudden start and slows to a gradual stop (sinusoidal).
/// </summary>
+ [Description("EASE_OUT_SINE")]
EaseOutSine,
/// <summary>
/// Speeds up and slows to a gradual stop (sinusoidal).
/// </summary>
+ [Description("EASE_IN_OUT_SINE")]
EaseInOutSine,
/// <summary>
/// Sudden start, loses momentum and returns to start position.
/// </summary>
+ [Description("BOUNCE")]
Bounce,
/// <summary>
/// Single revolution.
/// </summary>
+ [Description("SIN")]
Sin,
/// <summary>
/// Sudden start, exceed end position and return to a gradual stop.
/// </summary>
+ [Description("EASE_OUT_BACK")]
EaseOutBack,
/// <summary>
/// The count of the BuiltinFunctions enum.
/*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
public void AnimateBy(View target, string property, object relativeValue, AlphaFunction alphaFunction = null)
{
Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
- PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
- if (propertyType.Equals(PropertyType.Float))
- {
- System.Type type = relativeValue.GetType();
- if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
- {
- int num = (int)relativeValue;
- relativeValue = (float)num;
- }
- }
-
+ relativeValue = AvoidFloatPropertyHasIntegerValue(target, _prop, relativeValue);
PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
if (alphaFunction != null)
public void AnimateBy(View target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
{
Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
- PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
- if (propertyType.Equals(PropertyType.Float))
- {
- System.Type type = relativeValue.GetType();
- if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
- {
- int num = (int)relativeValue;
- relativeValue = (float)num;
- }
- }
-
+ relativeValue = AvoidFloatPropertyHasIntegerValue(target, _prop, relativeValue);
PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
if (alphaFunction != null)
public void AnimateTo(View target, string property, object destinationValue, AlphaFunction alphaFunction = null)
{
Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
- PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
- if (propertyType.Equals(PropertyType.Float))
- {
- System.Type type = destinationValue.GetType();
- if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
- {
- int num = (int)destinationValue;
- destinationValue = (float)num;
- }
- }
-
+ destinationValue = AvoidFloatPropertyHasIntegerValue(target, _prop, destinationValue);
PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
if (alphaFunction != null)
public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
{
Property _prop = PropertyHelper.GetPropertyFromString(target, property);
-
- PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
- if (propertyType.Equals(PropertyType.Float))
- {
- System.Type type = destinationValue.GetType();
- if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
- {
- int num = (int)destinationValue;
- destinationValue = (float)num;
- }
- }
-
+ destinationValue = AvoidFloatPropertyHasIntegerValue(target, _prop, destinationValue);
PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
if (alphaFunction != null)
{
return (int)(sec * 1000);
}
+
+ private object AvoidFloatPropertyHasIntegerValue(View target, Property property, object value)
+ {
+ PropertyType propertyType = target.GetPropertyType(property.propertyIndex);
+ if (propertyType.Equals(PropertyType.Float))
+ {
+ System.Type type = value.GetType();
+ if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
+ {
+ int num = (int)value;
+ value = (float)num;
+ }
+ }
+ return value;
+ }
}
}
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.TableView.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Children.Remove(ret);
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ View ret = this.GetInstanceSafely<View>(cPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
if (File.Exists(likelyResourcePath))
{
- trans = Extensions.LoadObject<Transition>(likelyResourcePath);
+ trans = Xaml.Extensions.LoadObject<Transition>(likelyResourcePath);
}
if (trans)
{
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ Layer ret = this.GetInstanceSafely<Layer>(cPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ View ret = this.GetInstanceSafely<View>(cPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
-// Copyright (c) 2017 Samsung Electronics Co., Ltd.
+// Copyright (c) 2019 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.
/// <since_tizen> 3 </since_tizen>
public Animation AnimateVisual(VisualMap target, string property, object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialValue = null)
{
- string _alphaFunction = null;
- if (alphaFunction != null)
- {
- switch (alphaFunction)
- {
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear:
- {
- _alphaFunction = "LINEAR";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse:
- {
- _alphaFunction = "REVERSE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare:
- {
- _alphaFunction = "EASE_IN_SQUARE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare:
- {
- _alphaFunction = "EASE_OUT_SQUARE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn:
- {
- _alphaFunction = "EASE_IN";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut:
- {
- _alphaFunction = "EASE_OUT";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut:
- {
- _alphaFunction = "EASE_IN_OUT";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine:
- {
- _alphaFunction = "EASE_IN_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine:
- {
- _alphaFunction = "EASE_OUT_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine:
- {
- _alphaFunction = "EASE_IN_OUT_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce:
- {
- _alphaFunction = "BOUNCE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin:
- {
- _alphaFunction = "SIN";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack:
- {
- _alphaFunction = "EASE_OUT_BACK";
- break;
- }
- default:
- {
- _alphaFunction = "DEFAULT";
- break;
- }
- }
- }
+ string _alphaFunction = alphaFunction?.GetDescription();
foreach (var item in _visualDictionary.ToList())
{
/// <since_tizen> 3 </since_tizen>
public void AnimateVisualAdd(VisualMap target, string property, object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialValue = null)
{
- string _alphaFunction = null;
- if (alphaFunction != null)
- {
- switch (alphaFunction)
- {
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear:
- {
- _alphaFunction = "LINEAR";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse:
- {
- _alphaFunction = "REVERSE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare:
- {
- _alphaFunction = "EASE_IN_SQUARE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare:
- {
- _alphaFunction = "EASE_OUT_SQUARE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn:
- {
- _alphaFunction = "EASE_IN";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut:
- {
- _alphaFunction = "EASE_OUT";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut:
- {
- _alphaFunction = "EASE_IN_OUT";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine:
- {
- _alphaFunction = "EASE_IN_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine:
- {
- _alphaFunction = "EASE_OUT_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine:
- {
- _alphaFunction = "EASE_IN_OUT_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce:
- {
- _alphaFunction = "BOUNCE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin:
- {
- _alphaFunction = "SIN";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack:
- {
- _alphaFunction = "EASE_OUT_BACK";
- break;
- }
- default:
- {
- _alphaFunction = "DEFAULT";
- break;
- }
- }
- }
+ string _alphaFunction = alphaFunction?.GetDescription();
foreach (var item in _visualDictionary.ToList())
{
{
return new VisualView();
}
+
}
-}
\ No newline at end of file
+}
}
}
- internal class CubeTransitionEffectSignal : global::System.IDisposable
+ internal class CubeTransitionEffectSignal : Disposable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- //A Flag to check who called Dispose(). (By User or DisposeQueue)
- private bool isDisposeQueued = false;
- //A Flat to check if it is already disposed.
- protected bool disposed = false;
-
-
- ~CubeTransitionEffectSignal()
- {
- if (!isDisposeQueued)
- {
- isDisposeQueued = true;
- DisposeQueue.Instance.Add(this);
- }
- }
-
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public bool Empty()
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public void Dispose()
- {
- //Throw excpetion if Dispose() is called in separate thread.
- if (!Window.IsInstalled())
- {
- throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
- }
-
- if (isDisposeQueued)
- {
- Dispose(DisposeTypes.Implicit);
- }
- else
- {
- Dispose(DisposeTypes.Explicit);
- System.GC.SuppressFinalize(this);
- }
- }
-
- /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual void Dispose(DisposeTypes type)
+ protected override void Dispose(DisposeTypes type)
{
if (disposed)
{
return;
}
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- }
-
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
- disposed = true;
+ base.Dispose(type);
}
}
-
-
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public class CubeTransitionWaveEffect : CubeTransitionEffect
return;
}
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- }
-
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
return;
}
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- }
-
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
return;
}
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- }
-
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
/*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.FocusManager.FocusManager_GetCurrentFocusActor(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
return ret;
}
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.FocusManager.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view));
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
return ret;
}
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.FocusManager.FocusManager_GetFocusIndicatorActor(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
return ret;
}
}
-}
\ No newline at end of file
+}
using System;
using Tizen.NUI.BaseComponents;
using System.ComponentModel;
-using System.Runtime.InteropServices;
using Tizen.NUI.Binding;
namespace Tizen.NUI
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ View ret = this.GetInstanceSafely<View>(cPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ View ret = this.GetInstanceSafely<View>(cPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
Interop.Layer.Layer_LowerToBottom(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
-
}
/// <summary>
-// Copyright (c) 2018 Samsung Electronics Co., Ltd.
+// Copyright (c) 2019 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.
{
get
{
- float ret = Interop.NDalicAnchorPoint.AnchorPointTop_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.Top;
}
}
/// <summary>
{
get
{
- float ret = Interop.NDalicAnchorPoint.AnchorPointBottom_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.Bottom;
}
}
/// <summary>
{
get
{
- float ret = Interop.NDalicAnchorPoint.AnchorPointLeft_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.Left;
}
}
/// <summary>
{
get
{
- float ret = Interop.NDalicAnchorPoint.AnchorPointRight_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.Right;
}
}
/// <summary>
{
get
{
- float ret = Interop.NDalicAnchorPoint.AnchorPointMiddle_get();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.Middle;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopLeft_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.TopLeft;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopCenter_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.TopCenter;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointTopRight_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.TopRight;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterLeft_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.CenterLeft;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenter_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.Center;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointCenterRight_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.CenterRight;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomLeft_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.BottomLeft;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomCenter_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.BottomCenter;
}
}
/// <summary>
{
get
{
- global::System.IntPtr cPtr = Interop.NDalicAnchorPoint.AnchorPointBottomRight_get();
- Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return PivotPoint.BottomRight;
}
}
}
/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
{
//to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = Interop.Renderer.Renderer_GetGeometry(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Geometry;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ Geometry ret = this.GetInstanceSafely<Geometry>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
//to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = Interop.Renderer.Renderer_GetShader(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Shader ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Shader;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ Shader ret = this.GetInstanceSafely<Shader>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
{
//to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = Interop.TextureSet.TextureSet_GetSampler(swigCPtr, index);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Sampler;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ Sampler ret = this.GetInstanceSafely<Sampler>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
base.Dispose(type);
}
}
-}
\ No newline at end of file
+}
/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
{
//to fix memory leak issue, match the handle count with native side.
global::System.IntPtr cPtr = Interop.Touch.Touch_GetHitActor(swigCPtr, point);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
Tertiary = 2,
}
-}
\ No newline at end of file
+}
/*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 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.
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Popup.Popup_GetTitle(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Popup.Popup_GetContent(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.Popup.Popup_GetFooter(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ View ret = this.GetInstanceSafely<View>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
protected virtual void ComposingPropertyMap()
{
- _outputVisualMap = new PropertyMap();
+ if (null == _outputVisualMap)
+ {
+ _outputVisualMap = new PropertyMap();
+ }
+
+ if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add(Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+ if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
}
private void ComposingTransformMap()
}
_outputVisualMap.Add(ImageVisualProperty.URL, (new PropertyValue(urlArray)));
}
- if (_batchSize != null) { _outputVisualMap.Add((int)ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); }
- if (_cacheSize != null) { _outputVisualMap.Add((int)ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); }
- if (_frameDelay != null) { _outputVisualMap.Add((int)ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); }
- if (_loopCount != null) { _outputVisualMap.Add((int)ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ if (_batchSize != null) { _outputVisualMap.Add(ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); }
+ if (_cacheSize != null) { _outputVisualMap.Add(ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); }
+ if (_frameDelay != null) { _outputVisualMap.Add(ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); }
+ if (_loopCount != null) { _outputVisualMap.Add(ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount)); }
+ base.ComposingPropertyMap();
}
}
}
_outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size));
_outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color));
if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
_outputVisualMap = new PropertyMap();
_outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color));
_outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual));
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+ if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
if (_renderIfTransparent != null) { _outputVisualMap.Add(ColorVisualProperty.RenderIfTransparent, new PropertyValue((bool)_renderIfTransparent)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
}
}
}
if (_stopOffset != null) { _outputVisualMap.Add(GradientVisualProperty.StopOffset, new PropertyValue(_stopOffset)); }
if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); }
if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); }
if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); }
if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_maskContentScale != null) { _outputVisualMap.Add((int)ImageVisualProperty.MaskContentScale, new PropertyValue((float)_maskContentScale)); }
- if (_cropToMask != null) { _outputVisualMap.Add((int)ImageVisualProperty.CropToMask, new PropertyValue((bool)_cropToMask)); }
- if (_auxiliaryImageAlpha != null) { _outputVisualMap.Add((int)ImageVisualProperty.AuxiliaryImageAlpha, new PropertyValue((float)_auxiliaryImageAlpha)); }
+ if (_maskContentScale != null) { _outputVisualMap.Add(ImageVisualProperty.MaskContentScale, new PropertyValue((float)_maskContentScale)); }
+ if (_cropToMask != null) { _outputVisualMap.Add(ImageVisualProperty.CropToMask, new PropertyValue((bool)_cropToMask)); }
+ if (_auxiliaryImageAlpha != null) { _outputVisualMap.Add(ImageVisualProperty.AuxiliaryImageAlpha, new PropertyValue((float)_auxiliaryImageAlpha)); }
if (_releasePolicy != null) { _outputVisualMap.Add(ImageVisualProperty.ReleasePolicy, new PropertyValue((int)_releasePolicy)); }
if (_loadPolicy != null) { _outputVisualMap.Add(ImageVisualProperty.LoadPolicy, new PropertyValue((int)_loadPolicy)); }
if (_orientationCorrection != null) { _outputVisualMap.Add(ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)_orientationCorrection)); }
if (_atlasing != null) { _outputVisualMap.Add(ImageVisualProperty.Atlasing, new PropertyValue((bool)_atlasing)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); }
if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); }
if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
_outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url));
if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); }
if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
if (_bevelPercentage != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelPercentage, new PropertyValue((float)_bevelPercentage)); }
if (_bevelSmoothness != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelSmoothness, new PropertyValue((float)_bevelSmoothness)); }
if (_lightPosition != null) { _outputVisualMap.Add(PrimitiveVisualProperty.LightPosition, new PropertyValue(_lightPosition)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+ if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
}
}
}
_outputVisualMap = new PropertyMap();
_outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG));
_outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url));
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); }
if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); }
if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); }
- if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
- if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
if (_shadow != null) { _outputVisualMap.Add(TextVisualProperty.Shadow, new PropertyValue(_shadow)); }
if (_underline != null) { _outputVisualMap.Add(TextVisualProperty.Underline, new PropertyValue(_underline)); }
if (_outline != null) { _outputVisualMap.Add(TextVisualProperty.Outline, new PropertyValue(_outline)); }
if (_background != null) { _outputVisualMap.Add(TextVisualProperty.Background, new PropertyValue(_background)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
{
get
{
- switch (_alphaFunction)
- {
- case "LINEAR":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear;
- case "REVERSE":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse;
- case "EASE_IN_SQUARE":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare;
- case "EASE_OUT_SQUARE":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare;
- case "EASE_IN":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn;
- case "EASE_OUT":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut;
- case "EASE_IN_OUT":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut;
- case "EASE_IN_SINE":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine;
- case "EASE_OUT_SINE":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine;
- case "EASE_IN_OUT_SINE":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine;
- case "BOUNCE":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce;
- case "SIN":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin;
- case "EASE_OUT_BACK":
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack;
- default:
- return Tizen.NUI.AlphaFunction.BuiltinFunctions.Default;
- }
+ return _alphaFunction.GetValueByDescription<AlphaFunction.BuiltinFunctions>();
}
set
{
- switch (value)
- {
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear:
- {
- _alphaFunction = "LINEAR";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse:
- {
- _alphaFunction = "REVERSE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare:
- {
- _alphaFunction = "EASE_IN_SQUARE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare:
- {
- _alphaFunction = "EASE_OUT_SQUARE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn:
- {
- _alphaFunction = "EASE_IN";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut:
- {
- _alphaFunction = "EASE_OUT";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut:
- {
- _alphaFunction = "EASE_IN_OUT";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine:
- {
- _alphaFunction = "EASE_IN_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine:
- {
- _alphaFunction = "EASE_OUT_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine:
- {
- _alphaFunction = "EASE_IN_OUT_SINE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce:
- {
- _alphaFunction = "BOUNCE";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin:
- {
- _alphaFunction = "SIN";
- break;
- }
- case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack:
- {
- _alphaFunction = "EASE_OUT_BACK";
- break;
- }
- default:
- {
- _alphaFunction = "DEFAULT";
- break;
- }
- }
+ _alphaFunction = value.GetDescription();
}
}
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
if (File.Exists(likelyResourcePath))
{
- trans = Extensions.LoadObject<Transition>(likelyResourcePath);
+ trans = Xaml.Extensions.LoadObject<Transition>(likelyResourcePath);
}
if (trans)
{