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