Prepare to implement NUI Constraint feature.
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
internal void Apply()
{
Interop.Constraint.Apply(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.ThrowExceptionIfExists();
}
+
/// <summary>
/// Remove current constraint.
/// </summary>
internal void Remove()
{
Interop.Constraint.Remove(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.ThrowExceptionIfExists();
}
-
/// <summary>
/// Remove action. Determine the target values action after remove current constriant.
/// Default is RemoveActionType.Bake
set => Interop.Constraint.SetRemoveAction(SwigCPtr, (int)value);
get => (RemoveActionType) Interop.Constraint.GetRemoveAction(SwigCPtr);
}
-
+
/// <summary>
/// Tag number. It will be useful when you want to seperate constraints
/// </summary>
internal BaseHandle GetTargetObject()
{
BaseHandle handle = new BaseHandle(Interop.Constraint.GetTargetObject(SwigCPtr), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.ThrowExceptionIfExists();
return handle;
}
/// <summary>
/// Get constrainted target property index
/// </summary>
- internal int GetTargetPropert()
+ internal int GetTargetPropertyIndex()
{
int index = Interop.Constraint.GetTargetProperty(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.ThrowExceptionIfExists();
return index;
}
//Called by User
//Release your own managed resources here.
//You should release all of your own disposable objects here.
+ Remove();
}
base.Dispose(type);
}
protected override void ReleaseSwigCPtr(HandleRef swigCPtr)
{
Interop.Constraint.DeleteConstraint(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.ThrowExceptionIfExists();
}
-
+
/// <summary>
/// Determinate how objects property will be when constraint removed.
/// Default is Bake.
internal EqualConstraintWithParentFloat(HandleRef handle, int targetIndex, int parentIndex)
: base(Interop.Constraint.NewEqualConstraintWithParentFloat(handle, targetIndex, parentIndex), true)
{
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.ThrowExceptionIfExists();
}
}
}
namespace Tizen.NUI
{
using global::System.Runtime.InteropServices;
-
+
/// <summary>
/// Specialized Constraint.
/// Make handle's targetIndex value always equal with handle's parent's parentIndex value
internal RelativeConstraintWithParentFloat(HandleRef handle, int targetIndex, int parentIndex, float rate)
: base(Interop.Constraint.NewRelativeConstraintWithParentFloat(handle, targetIndex, parentIndex, rate), true)
{
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ NDalicPINVOKE.ThrowExceptionIfExists();
}
}
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Rotation_4")]
public static extern global::System.IntPtr NewRotation4(global::System.Runtime.InteropServices.HandleRef vector4);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Rotation_Assign")]
+ public static extern global::System.IntPtr RotationAssign(global::System.Runtime.InteropServices.HandleRef destination, global::System.Runtime.InteropServices.HandleRef source);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Rotation")]
public static extern void DeleteRotation(global::System.Runtime.InteropServices.HandleRef rotation);
public int GetPropertyIndex(string name)
{
// Convert property string to be lowercase
- StringBuilder sb = new StringBuilder(name);
- sb[0] = (char)(sb[0] | 0x20);
- string str = sb.ToString();
-
- int ret = Interop.Handle.GetPropertyIndex(SwigCPtr, str);
+ int ret = Interop.Handle.GetPropertyIndex(SwigCPtr, LowerFirstLetter(name));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
else
{
- widthConstraint?.Remove();
widthConstraint?.Dispose();
widthConstraint = null;
}
else
{
- heightConstraint?.Remove();
heightConstraint?.Dispose();
heightConstraint = null;
}
if (widthConstraint != null)
{
- widthConstraint.Remove();
widthConstraint.Dispose();
}
if (heightConstraint != null)
{
- heightConstraint.Remove();
heightConstraint.Dispose();
}
}
}
- internal static int InvalidIndex
- {
- get
- {
- int ret = Interop.Property.InvalidIndexGet();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- internal static int InvalidKey
- {
- get
- {
- int ret = Interop.Property.InvalidKeyGet();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
- internal static int InvalidComponentIndex
- {
- get
- {
- int ret = Interop.Property.InvalidComponentIndexGet();
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
internal Animatable Object
{
set
}
}
+ internal const int InvalidIndex = -1; // Should be match with Interop.Property.InvalidIndexGet()
+ internal const int InvalidKey = -1; // Should be match with Interop.Property.InvalidKeyGet()
+ internal const int InvalidComponentIndex = -1; // Should be match with Interop.Property.InvalidComponentIndexGet()
+
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.Property.DeleteProperty(swigCPtr);
{
}
+ /// <summary>
+ /// Assign.
+ /// </summary>
+ /// <param name="rhs">A reference to the copied handle.</param>
+ /// <returns>A reference to this.</returns>
+ internal Rotation Assign(Rotation rhs)
+ {
+ Rotation ret = new Rotation(Interop.Rotation.RotationAssign(SwigCPtr, Rotation.getCPtr(rhs)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
/// This will not be public opened.
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)