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 //------------------------------------------------------------------------------
14 public class WindowFocusSignalType : global::System.IDisposable
16 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17 protected bool swigCMemOwn;
19 internal WindowFocusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
21 swigCMemOwn = cMemoryOwn;
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WindowFocusSignalType obj)
27 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 ~WindowFocusSignalType()
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_WindowFocusSignalType(swigCPtr);
91 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
99 bool ret = NDalicPINVOKE.WindowFocusSignalType_Empty(swigCPtr);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104 public uint GetConnectionCount()
106 uint ret = NDalicPINVOKE.WindowFocusSignalType_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.WindowFocusSignalType_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.WindowFocusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 public void Emit(bool arg)
131 NDalicPINVOKE.WindowFocusSignalType_Emit(swigCPtr, arg);
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 public WindowFocusSignalType() : this(NDalicPINVOKE.new_WindowFocusSignalType(), true)
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();