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 //------------------------------------------------------------------------------
11 using Tizen.NUI.BaseComponents;
16 internal class ControlKeySignal : global::System.IDisposable
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
19 protected bool swigCMemOwn;
21 internal ControlKeySignal(global::System.IntPtr cPtr, bool cMemoryOwn)
23 swigCMemOwn = cMemoryOwn;
24 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ControlKeySignal obj)
29 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
32 //A Flag to check who called Dispose(). (By User or DisposeQueue)
33 private bool isDisposeQueued = false;
34 //A Flat to check if it is already disposed.
35 protected bool disposed = false;
42 isDisposeQueued = true;
43 DisposeQueue.Instance.Add(this);
49 //Throw excpetion if Dispose() is called in separate thread.
50 if (!Window.IsInstalled())
52 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
57 Dispose(DisposeTypes.Implicit);
61 Dispose(DisposeTypes.Explicit);
62 System.GC.SuppressFinalize(this);
66 protected virtual void Dispose(DisposeTypes type)
73 if (type == DisposeTypes.Explicit)
76 //Release your own managed resources here.
77 //You should release all of your own disposable objects here.
81 //Release your own unmanaged resources here.
82 //You should not access any managed member here except static instance.
83 //because the execution order of Finalizes is non-deterministic.
85 if (swigCPtr.Handle != global::System.IntPtr.Zero)
90 NDalicPINVOKE.delete_ControlKeySignal(swigCPtr);
92 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
101 bool ret = NDalicPINVOKE.ControlKeySignal_Empty(swigCPtr);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 public uint GetConnectionCount()
108 uint ret = NDalicPINVOKE.ControlKeySignal_GetConnectionCount(swigCPtr);
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 public void Connect(System.Delegate func)
115 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
117 NDalicPINVOKE.ControlKeySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122 public void Disconnect(System.Delegate func)
124 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
126 NDalicPINVOKE.ControlKeySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 public bool Emit(View arg1, Key arg2)
133 bool ret = NDalicPINVOKE.ControlKeySignal_Emit(swigCPtr, View.getCPtr(arg1), Key.getCPtr(arg2));
134 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 public ControlKeySignal() : this(NDalicPINVOKE.new_ControlKeySignal(), true)
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();