/*
- * 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.
/// The gesture state.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class PaddingType : global::System.IDisposable
+ public class PaddingType : Disposable
{
- /// <summary>
- /// swigCMemOwn
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- protected bool swigCMemOwn;
-
- /// <summary>
- /// A Flat to check if it is already disposed.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- protected bool disposed = false;
-
- //A Flag to check who called Dispose(). (By User or DisposeQueue)
- private bool isDisposeQueued = false;
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
/// <summary>
/// Creates an uninitialized PaddingType.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public PaddingType() : this(Interop.PaddingType.new_PaddingType__SWIG_0(), true)
+ public PaddingType() : this(Interop.PaddingType.NewPaddingType(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <param name="top">Top padding or Height</param>
/// <param name="bottom">Bottom padding or Width</param>
/// <since_tizen> 3 </since_tizen>
- public PaddingType(float start, float end, float top, float bottom) : this(Interop.PaddingType.new_PaddingType__SWIG_1(start, end, top, bottom), true)
+ public PaddingType(float start, float end, float top, float bottom) : this(Interop.PaddingType.NewPaddingType(start, end, top, bottom), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal PaddingType(global::System.IntPtr cPtr, bool cMemoryOwn)
+ internal PaddingType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- }
-
- /// <summary>
- /// Dispose.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- ~PaddingType()
- {
- if (!isDisposeQueued)
- {
- isDisposeQueued = true;
- DisposeQueue.Instance.Add(this);
- }
}
/// <summary>
{
set
{
- Interop.PaddingType.PaddingType_left_set(swigCPtr, value);
+ Interop.PaddingType.LeftSet(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = Interop.PaddingType.PaddingType_left_get(swigCPtr);
+ float ret = Interop.PaddingType.LeftGet(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
set
{
- Interop.PaddingType.PaddingType_start_set(swigCPtr, value);
+ Interop.PaddingType.StartSet(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = Interop.PaddingType.PaddingType_start_get(swigCPtr);
+ float ret = Interop.PaddingType.StartGet(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
set
{
- Interop.PaddingType.PaddingType_right_set(swigCPtr, value);
+ Interop.PaddingType.RightSet(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = Interop.PaddingType.PaddingType_right_get(swigCPtr);
+ float ret = Interop.PaddingType.RightGet(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
set
{
- Interop.PaddingType.PaddingType_end_set(swigCPtr, value);
+ Interop.PaddingType.EndSet(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = Interop.PaddingType.PaddingType_end_get(swigCPtr);
+ float ret = Interop.PaddingType.EndGet(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
set
{
- Interop.PaddingType.PaddingType_top_set(swigCPtr, value);
+ Interop.PaddingType.TopSet(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = Interop.PaddingType.PaddingType_top_get(swigCPtr);
+ float ret = Interop.PaddingType.TopGet(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
{
set
{
- Interop.PaddingType.PaddingType_bottom_set(swigCPtr, value);
+ Interop.PaddingType.BottomSet(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
- float ret = Interop.PaddingType.PaddingType_bottom_get(swigCPtr);
+ float ret = Interop.PaddingType.BottomGet(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
/// <summary>
- /// Dispose.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- 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);
- }
- }
-
-
- /// <summary>
/// Equals
/// </summary>
/// <param name="o">The object should be compared.</param>
/// <since_tizen> 4 </since_tizen>
public override bool Equals(object o)
{
- if(o == null)
+ if (o == null)
{
return false;
}
- if(!(o is PaddingType))
+ 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)) &&
+ 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));
/// <since_tizen> 3 </since_tizen>
public void Set(float newStart, float newEnd, float newTop, float newBottom)
{
- Interop.PaddingType.PaddingType_Set(swigCPtr, newStart, newEnd, newTop, newBottom);
+ Interop.PaddingType.Set(swigCPtr, newStart, newEnd, newTop, newBottom);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- /// <summary>
- /// Dispose.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- protected virtual void Dispose(DisposeTypes type)
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
- 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;
- Interop.PaddingType.delete_PaddingType(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
-
- disposed = true;
+ Interop.PaddingType.DeletePaddingType(swigCPtr);
}
}
-
-}
\ No newline at end of file
+}