nui 0.2.28 release
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / ControlKeySignal.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 using Tizen.NUI.BaseComponents;
12
13 namespace Tizen.NUI {
14
15     internal class ControlKeySignal : global::System.IDisposable {
16   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17   protected bool swigCMemOwn;
18
19   internal ControlKeySignal(global::System.IntPtr cPtr, bool cMemoryOwn) {
20     swigCMemOwn = cMemoryOwn;
21     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
22   }
23
24   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ControlKeySignal obj) {
25     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
26   }
27
28   ~ControlKeySignal() {
29     DisposeQueue.Instance.Add(this);
30   }
31
32   public virtual void Dispose() {
33     if (!Window.IsInstalled()) {
34       DisposeQueue.Instance.Add(this);
35       return;
36     }
37
38     lock(this) {
39       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
40         if (swigCMemOwn) {
41           swigCMemOwn = false;
42           NDalicPINVOKE.delete_ControlKeySignal(swigCPtr);
43         }
44         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
45       }
46       global::System.GC.SuppressFinalize(this);
47     }
48   }
49
50
51   public bool Empty() {
52     bool ret = NDalicPINVOKE.ControlKeySignal_Empty(swigCPtr);
53     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54     return ret;
55   }
56
57   public uint GetConnectionCount() {
58     uint ret = NDalicPINVOKE.ControlKeySignal_GetConnectionCount(swigCPtr);
59     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
60     return ret;
61   }
62
63   public void Connect(System.Delegate func) {
64 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); 
65     {
66       NDalicPINVOKE.ControlKeySignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
67       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68     }
69   }
70
71   public void Disconnect(System.Delegate func) {
72 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); 
73     {
74       NDalicPINVOKE.ControlKeySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
75       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76     }
77   }
78
79   public bool Emit(View arg1, Key arg2) {
80     bool ret = NDalicPINVOKE.ControlKeySignal_Emit(swigCPtr, View.getCPtr(arg1), Key.getCPtr(arg2));
81     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82     return ret;
83   }
84
85   public ControlKeySignal() : this(NDalicPINVOKE.new_ControlKeySignal(), true) {
86     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87   }
88
89 }
90
91 }