X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FPaddingType.cs;h=35a324d963e935caeee6aa59b3fe66aaed41584b;hb=46b8a31f5c1c75a22b648ca394a4de8a50898513;hp=0dc76a943fbbfa9bb9bdb3e3fb8bc0c288b57302;hpb=3477d25229a1e34e46001d70d81886fa44a38cac;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
diff --git a/src/Tizen.NUI/src/public/PaddingType.cs b/src/Tizen.NUI/src/public/PaddingType.cs
index 0dc76a9..35a324d 100755
--- a/src/Tizen.NUI/src/public/PaddingType.cs
+++ b/src/Tizen.NUI/src/public/PaddingType.cs
@@ -17,205 +17,55 @@
namespace Tizen.NUI
{
-
using System;
+ using System.ComponentModel;
///
/// The gesture state.
///
- public class PaddingType : global::System.IDisposable
+ /// 3
+ public class PaddingType : Disposable
{
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
///
/// swigCMemOwn
///
- protected bool swigCMemOwn;
-
- internal PaddingType(global::System.IntPtr cPtr, bool cMemoryOwn)
- {
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- }
-
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PaddingType obj)
- {
- 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;
-
- ///
- /// Dispose.
- ///
- /// 3
- ~PaddingType()
- {
- if (!isDisposeQueued)
- {
- isDisposeQueued = true;
- DisposeQueue.Instance.Add(this);
- }
- }
-
- ///
- /// Dispose.
- ///
/// 3
- 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);
- }
- }
-
- ///
- /// Dispose.
- ///
- /// 3
- protected virtual 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.
-
- if (swigCPtr.Handle != global::System.IntPtr.Zero)
- {
- if (swigCMemOwn)
- {
- swigCMemOwn = false;
- NDalicPINVOKE.delete_PaddingType(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
+ protected bool swigCMemOwn;
- disposed = true;
- }
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
///
- /// Equality operator.
+ /// Creates an uninitialized PaddingType.
///
- /// First operand
- /// Second operand
- /// True if the values are identical
/// 3
- public static bool operator ==(PaddingType a, PaddingType b)
+ public PaddingType() : this(Interop.PaddingType.new_PaddingType__SWIG_0(), true)
{
- // If both are null, or both are same instance, return true.
- if (System.Object.ReferenceEquals(a, b))
- {
- return true;
- }
-
- // If one is null, but not both, return false.
- if (((object)a == null) || ((object)b == null))
- {
- return false;
- }
-
- // Return true if the fields match:
- return (System.Math.Abs(a.Start- b.Start) < NDalic.GetRangedEpsilon(a.Start, b.Start)) &&
- (System.Math.Abs(a.End - b.End) < NDalic.GetRangedEpsilon(a.End, b.End)) &&
- (System.Math.Abs(a.Bottom - b.Bottom) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom)) &&
- (System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
- /// Inequality operator.
+ /// PaddingType Constructor.
///
- /// First operand
- /// Second operand
- /// True if the values are not identical
+ /// Start padding or X coordinate
+ /// End padding or Y coordinate
+ /// Top padding or Height
+ /// Bottom padding or Width
/// 3
- public static bool operator !=(PaddingType a, PaddingType b)
- {
- return !(a == b);
- }
-
-
- ///
- /// Equals
- ///
- /// The object should be compared.
- /// True if equal.
- /// 4
- public override bool Equals(object o)
- {
- if(o == null)
- {
- return false;
- }
- if(!(o is PaddingType))
- {
- return false;
- }
- PaddingType p = (PaddingType)o;
-
- // Return true if the fields match:
- return (System.Math.Abs(Start- p.Start) < NDalic.GetRangedEpsilon(Start, p.Start)) &&
- (System.Math.Abs(End - p.End) < NDalic.GetRangedEpsilon(End, p.End)) &&
- (System.Math.Abs(Bottom - p.Bottom) < NDalic.GetRangedEpsilon(Bottom, p.Bottom)) &&
- (System.Math.Abs(Top - p.Top) < NDalic.GetRangedEpsilon(Top, p.Top));
- }
-
- ///
- /// Gets the the hash code of this baseHandle.
- ///
- /// The Hash Code.
- /// 4
- public override int GetHashCode()
+ public PaddingType(float start, float end, float top, float bottom) : this(Interop.PaddingType.new_PaddingType__SWIG_1(start, end, top, bottom), true)
{
- return base.GetHashCode();
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- ///
- /// The Left value.
- ///
- [Obsolete("Please do not use! this will be removed. please use Start instead")]
- public float Left
+ internal PaddingType(global::System.IntPtr cPtr, bool cMemoryOwn)
{
- set
- {
- left = value;
- }
- get
- {
- return left;
- }
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
///
/// The Start value.
///
+ /// 4
public float Start
{
set
@@ -229,24 +79,9 @@ namespace Tizen.NUI
}
///
- /// The Right value.
- ///
- [Obsolete("Please do not use! this will be removed. please use End instead")]
- public float Right
- {
- set
- {
- right = value;
- }
- get
- {
- return right;
- }
- }
-
- ///
/// The End value.
///
+ /// 4
public float End
{
set
@@ -291,50 +126,16 @@ namespace Tizen.NUI
}
}
- ///
- /// Creates an uninitialized PaddingType.
- ///
- /// 3
- public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- ///
- /// PaddingType Constructor.
- ///
- /// Start padding or X coordinate
- /// End padding or Y coordinate
- /// Top padding or Height
- /// Bottom padding or Width
- public PaddingType(float start, float end, float top, float bottom) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(start, end, bottom, top), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- ///
- /// Assignment from individual values.
- ///
- /// Start padding or X coordinate
- /// End padding or Y coordinate
- /// Top padding or Height
- /// Bottom padding or Width
- public void Set(float newStart, float newEnd, float newTop, float newBottom)
- {
- NDalicPINVOKE.PaddingType_Set(swigCPtr, newStart, newEnd, newBottom, newTop);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
private float left
{
set
{
- NDalicPINVOKE.PaddingType_left_set(swigCPtr, value);
+ Interop.PaddingType.PaddingType_left_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_left_get(swigCPtr);
+ float ret = Interop.PaddingType.PaddingType_left_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
@@ -344,12 +145,12 @@ namespace Tizen.NUI
{
set
{
- NDalicPINVOKE.PaddingType_start_set(swigCPtr, value);
+ Interop.PaddingType.PaddingType_start_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_start_get(swigCPtr);
+ float ret = Interop.PaddingType.PaddingType_start_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
@@ -359,12 +160,12 @@ namespace Tizen.NUI
{
set
{
- NDalicPINVOKE.PaddingType_right_set(swigCPtr, value);
+ Interop.PaddingType.PaddingType_right_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_right_get(swigCPtr);
+ float ret = Interop.PaddingType.PaddingType_right_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
@@ -374,12 +175,12 @@ namespace Tizen.NUI
{
set
{
- NDalicPINVOKE.PaddingType_end_set(swigCPtr, value);
+ Interop.PaddingType.PaddingType_end_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_end_get(swigCPtr);
+ float ret = Interop.PaddingType.PaddingType_end_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
@@ -389,12 +190,12 @@ namespace Tizen.NUI
{
set
{
- NDalicPINVOKE.PaddingType_top_set(swigCPtr, value);
+ Interop.PaddingType.PaddingType_top_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr);
+ float ret = Interop.PaddingType.PaddingType_top_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
@@ -404,16 +205,137 @@ namespace Tizen.NUI
{
set
{
- NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value);
+ Interop.PaddingType.PaddingType_bottom_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr);
+ float ret = Interop.PaddingType.PaddingType_bottom_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
- }
+ ///
+ /// Equality operator.
+ ///
+ /// First operand
+ /// Second operand
+ /// True if the values are identical
+ /// 3
+ public static bool operator ==(PaddingType a, PaddingType b)
+ {
+ // If both are null, or both are same instance, return true.
+ if (System.Object.ReferenceEquals(a, b))
+ {
+ return true;
+ }
+
+ // If one is null, but not both, return false.
+ if (((object)a == null) || ((object)b == null))
+ {
+ return false;
+ }
+
+ // Return true if the fields match:
+ return (System.Math.Abs(a.Start - b.Start) < NDalic.GetRangedEpsilon(a.Start, b.Start)) &&
+ (System.Math.Abs(a.End - b.End) < NDalic.GetRangedEpsilon(a.End, b.End)) &&
+ (System.Math.Abs(a.Bottom - b.Bottom) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom)) &&
+ (System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top));
+ }
+
+ ///
+ /// Inequality operator.
+ ///
+ /// First operand
+ /// Second operand
+ /// True if the values are not identical
+ /// 3
+ public static bool operator !=(PaddingType a, PaddingType b)
+ {
+ return !(a == b);
+ }
+
+ ///
+ /// Equals
+ ///
+ /// The object should be compared.
+ /// True if equal.
+ /// 4
+ public override bool Equals(object o)
+ {
+ if(o == null)
+ {
+ return false;
+ }
+ if(!(o is PaddingType))
+ {
+ return false;
+ }
+ PaddingType p = (PaddingType)o;
+
+ // Return true if the fields match:
+ return (System.Math.Abs(Start- p.Start) < NDalic.GetRangedEpsilon(Start, p.Start)) &&
+ (System.Math.Abs(End - p.End) < NDalic.GetRangedEpsilon(End, p.End)) &&
+ (System.Math.Abs(Bottom - p.Bottom) < NDalic.GetRangedEpsilon(Bottom, p.Bottom)) &&
+ (System.Math.Abs(Top - p.Top) < NDalic.GetRangedEpsilon(Top, p.Top));
+ }
+
+ ///
+ /// Gets the the hash code of this baseHandle.
+ ///
+ /// The Hash Code.
+ /// 4
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ ///
+ /// Assignment from individual values.
+ ///
+ /// Start padding or X coordinate
+ /// End padding or Y coordinate
+ /// Top padding or Height
+ /// Bottom padding or Width
+ /// 3
+ public void Set(float newStart, float newEnd, float newTop, float newBottom)
+ {
+ Interop.PaddingType.PaddingType_Set(swigCPtr, newStart, newEnd, newTop, newBottom);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PaddingType obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ ///
+ /// Dispose.
+ ///
+ /// 3
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ //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.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ Interop.PaddingType.delete_PaddingType(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ base.Dispose(type);
+ }
+ }
}
\ No newline at end of file