Release 4.0.0-preview1-00301
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / WidgetViewSignal.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.12
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     /// <summary>
14     /// WidgetViewSignal
15     /// </summary>
16     /// <since_tizen> 3 </since_tizen>
17     public class WidgetViewSignal : global::System.IDisposable
18     {
19         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20         /// <summary>
21         /// swigCMemOwn
22         /// </summary>
23         /// <since_tizen> 3 </since_tizen>
24         protected bool swigCMemOwn;
25
26         internal WidgetViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn)
27         {
28             swigCMemOwn = cMemoryOwn;
29             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30         }
31
32         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetViewSignal obj)
33         {
34             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35         }
36
37         /// <summary>
38         /// Dispose
39         /// </summary>
40         /// <since_tizen> 3 </since_tizen>
41         ~WidgetViewSignal()
42         {
43             Dispose();
44         }
45
46         /// <summary>
47         /// Dispose
48         /// </summary>
49         /// <since_tizen> 3 </since_tizen>
50         public virtual void Dispose()
51         {
52             lock (this)
53             {
54                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
55                 {
56                     if (swigCMemOwn)
57                     {
58                         swigCMemOwn = false;
59                         NDalicManualPINVOKE.delete_WidgetViewSignal(swigCPtr);
60                     }
61                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
62                 }
63                 global::System.GC.SuppressFinalize(this);
64             }
65         }
66
67         /// <summary>
68         /// Queries whether there are any connected slots.
69         /// </summary>
70         /// <returns>True if there are any slots connected to the signal</returns>
71         /// <since_tizen> 3 </since_tizen>
72         public bool Empty()
73         {
74             bool ret = NDalicManualPINVOKE.WidgetViewSignal_Empty(swigCPtr);
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76             return ret;
77         }
78
79         /// <summary>
80         /// Queries the number of slots.
81         /// </summary>
82         /// <returns>The number of slots connected to this signal</returns>
83         /// <since_tizen> 3 </since_tizen>
84         public uint GetConnectionCount()
85         {
86             uint ret = NDalicManualPINVOKE.WidgetViewSignal_GetConnectionCount(swigCPtr);
87             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88             return ret;
89         }
90
91         /// <summary>
92         /// Connects a function.
93         /// </summary>
94         /// <param name="func">The function to connect</param>
95         /// <since_tizen> 3 </since_tizen>
96         public void Connect(System.Delegate func)
97         {
98             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
99             {
100                 NDalicManualPINVOKE.WidgetViewSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
101                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102             }
103         }
104
105         /// <summary>
106         /// Disconnects a function.
107         /// </summary>
108         /// <param name="func">The function to disconnect</param>
109         /// <since_tizen> 3 </since_tizen>
110         public void Disconnect(System.Delegate func)
111         {
112             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
113             {
114                 NDalicManualPINVOKE.WidgetViewSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
115                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116             }
117         }
118
119         /// <summary>
120         /// Connects a member function.
121         /// </summary>
122         /// <param name="arg">The member function to connect</param>
123         /// <since_tizen> 3 </since_tizen>
124         public void Emit(WidgetView arg)
125         {
126             NDalicManualPINVOKE.WidgetViewSignal_Emit(swigCPtr, WidgetView.getCPtr(arg));
127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128         }
129
130         /// <summary>
131         /// The contructor.
132         /// </summary>
133         /// <since_tizen> 3 </since_tizen>
134         public WidgetViewSignal() : this(NDalicManualPINVOKE.new_WidgetViewSignal(), true)
135         {
136             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137         }
138
139     }
140
141 }