1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 using Tizen.NUI.BaseComponents;
15 internal class ViewResourceReadySignal : global::System.IDisposable
17 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
18 protected bool swigCMemOwn;
20 internal ViewResourceReadySignal(global::System.IntPtr cPtr, bool cMemoryOwn)
22 swigCMemOwn = cMemoryOwn;
23 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewResourceReadySignal obj)
28 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31 //A Flag to check who called Dispose(). (By User or DisposeQueue)
32 private bool isDisposeQueued = false;
33 //A Flat to check if it is already disposed.
34 protected bool disposed = false;
37 ~ViewResourceReadySignal()
41 isDisposeQueued = true;
42 DisposeQueue.Instance.Add(this);
48 //Throw excpetion if Dispose() is called in separate thread.
49 if (!Window.IsInstalled())
51 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
56 Dispose(DisposeTypes.Implicit);
60 Dispose(DisposeTypes.Explicit);
61 System.GC.SuppressFinalize(this);
65 protected virtual void Dispose(DisposeTypes type)
72 if (type == DisposeTypes.Explicit)
75 //Release your own managed resources here.
76 //You should release all of your own disposable objects here.
80 //Release your own unmanaged resources here.
81 //You should not access any managed member here except static instance.
82 //because the execution order of Finalizes is non-deterministic.
84 if (swigCPtr.Handle != global::System.IntPtr.Zero)
89 NDalicPINVOKE.delete_ViewResourceReadySignal(swigCPtr);
91 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
99 bool ret = NDalicPINVOKE.ViewResourceReadySignal_Empty(swigCPtr);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104 public uint GetConnectionCount()
106 uint ret = NDalicPINVOKE.ViewResourceReadySignal_GetConnectionCount(swigCPtr);
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 public void Connect(System.Delegate func)
113 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
115 NDalicPINVOKE.ViewResourceReadySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 public void Disconnect(System.Delegate func)
122 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
124 NDalicPINVOKE.ViewResourceReadySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 public void Emit(View arg)
131 NDalicPINVOKE.ViewResourceReadySignal_Emit(swigCPtr, View.getCPtr(arg));
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 public ViewResourceReadySignal() : this(NDalicPINVOKE.new_ViewResourceReadySignal(), true)
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();