manual nui merge 0.2.38
[platform/core/csapi/nui.git] / Tizen.NUI / src / internal / ApplicationSignal.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 namespace Tizen.NUI
12 {
13
14     internal class ApplicationSignal : global::System.IDisposable
15     {
16         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17         protected bool swigCMemOwn;
18
19         internal ApplicationSignal(global::System.IntPtr cPtr, bool cMemoryOwn)
20         {
21             swigCMemOwn = cMemoryOwn;
22             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23         }
24
25         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ApplicationSignal obj)
26         {
27             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28         }
29
30         ~ApplicationSignal()
31         {
32             DisposeQueue.Instance.Add(this);
33         }
34
35         public virtual void Dispose()
36         {
37             if (!Window.IsInstalled())
38             {
39                 DisposeQueue.Instance.Add(this);
40                 return;
41             }
42
43             lock (this)
44             {
45                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
46                 {
47                     if (swigCMemOwn)
48                     {
49                         swigCMemOwn = false;
50                         NDalicPINVOKE.delete_ApplicationSignal(swigCPtr);
51                     }
52                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
53                 }
54                 global::System.GC.SuppressFinalize(this);
55             }
56         }
57
58
59         public bool Empty()
60         {
61             bool ret = NDalicPINVOKE.ApplicationSignal_Empty(swigCPtr);
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63             return ret;
64         }
65
66         public uint GetConnectionCount()
67         {
68             uint ret = NDalicPINVOKE.ApplicationSignal_GetConnectionCount(swigCPtr);
69             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70             return ret;
71         }
72
73         public void Connect(System.Delegate func)
74         {
75             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
76             {
77                 NDalicPINVOKE.ApplicationSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
78                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79             }
80         }
81
82         public void Disconnect(System.Delegate func)
83         {
84             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
85             {
86                 NDalicPINVOKE.ApplicationSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
87                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88             }
89         }
90
91         public void Emit(Application arg)
92         {
93             NDalicPINVOKE.ApplicationSignal_Emit(swigCPtr, Application.getCPtr(arg));
94             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95         }
96
97         public ApplicationSignal() : this(NDalicPINVOKE.new_ApplicationSignal(), true)
98         {
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100         }
101
102     }
103
104 }