*
*/
-using Tizen.NUI.BaseComponents;
-
namespace Tizen.NUI
{
+ using Tizen.NUI.BaseComponents;
/// <summary>
/// Hover events are a collection of points at a specific moment in time.<br />
/// When a multi-event occurs, each point represents the points that are currently being
/// <since_tizen> 3 </since_tizen>
public class Hover : global::System.IDisposable
{
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
/// <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;
+ internal Hover(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Hover 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;
-
/// <summary>
- /// The default constructor.
+ /// A Flat to check if it is already disposed.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Hover() : this(NDalicPINVOKE.new_Hover__SWIG_0(), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- /// <summary>
- /// The constructor.
- /// </summary>
- /// <param name="time">The time the event occurred.</param>
- internal Hover(uint time) : this(NDalicPINVOKE.new_Hover__SWIG_1(time), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- internal Hover(global::System.IntPtr cPtr, bool cMemoryOwn)
- {
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- }
+ protected bool disposed = false;
/// <summary>
/// Dispose.
}
/// <summary>
- /// The time (in ms) that the hover event occurred.
+ /// Dispose.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public uint Time
+ public void Dispose()
{
- get
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
{
- return time;
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
}
- }
- private TouchPointContainer points
- {
- set
+ if (isDisposeQueued)
{
- NDalicPINVOKE.Hover_points_set(swigCPtr, TouchPointContainer.getCPtr(value));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ Dispose(DisposeTypes.Implicit);
}
- get
+ else
{
- global::System.IntPtr cPtr = NDalicPINVOKE.Hover_points_get(swigCPtr);
- TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
}
}
- private uint time
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ protected virtual void Dispose(DisposeTypes type)
{
- set
+ if (disposed)
{
- NDalicPINVOKE.Hover_time_set(swigCPtr, value);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ 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_Hover(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
+ disposed = true;
+ }
+
+
+ internal static Hover GetHoverFromPtr(global::System.IntPtr cPtr)
+ {
+ Hover ret = new Hover(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// The time (in ms) that the hover event occurred.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public uint Time
+ {
get
{
- uint ret = NDalicPINVOKE.Hover_time_get(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ return time;
}
}
}
/// <summary>
- /// Returns the total number of points.
+ /// The default constructor.
/// </summary>
- /// <returns>Total number of points.</returns>
/// <since_tizen> 3 </since_tizen>
- public uint GetPointCount()
+ public Hover() : this(NDalicPINVOKE.new_Hover__SWIG_0(), true)
{
- uint ret = NDalicPINVOKE.Hover_GetPointCount(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
}
/// <summary>
- /// Dispose.
+ /// The constructor.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public void Dispose()
+ /// <param name="time">The time the event occurred.</param>
+ internal Hover(uint time) : this(NDalicPINVOKE.new_Hover__SWIG_1(time), true)
{
- //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 (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
- if (isDisposeQueued)
+ private TouchPointContainer points
+ {
+ set
{
- Dispose(DisposeTypes.Implicit);
+ NDalicPINVOKE.Hover_points_set(swigCPtr, TouchPointContainer.getCPtr(value));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- else
+ get
{
- Dispose(DisposeTypes.Explicit);
- System.GC.SuppressFinalize(this);
+ global::System.IntPtr cPtr = NDalicPINVOKE.Hover_points_get(swigCPtr);
+ TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
}
}
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Hover obj)
+ private uint time
{
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ set
+ {
+ NDalicPINVOKE.Hover_time_set(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ uint ret = NDalicPINVOKE.Hover_time_get(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
}
- internal static Hover GetHoverFromPtr(global::System.IntPtr cPtr)
+ /// <summary>
+ /// Returns the total number of points.
+ /// </summary>
+ /// <returns>Total number of points.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public uint GetPointCount()
{
- Hover ret = new Hover(cPtr, false);
+ uint ret = NDalicPINVOKE.Hover_GetPointCount(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
return ret;
}
- /// <summary>
- /// Dispose.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- 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_Hover(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
- disposed = true;
- }
}
+
}
\ No newline at end of file