[NUI] Add license, delete unnecessary code (#2679)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Widget / WidgetViewSignal.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     /// <summary>
24     /// WidgetViewSignal
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     [Obsolete("Deprecated in API6, Will be removed in API9, Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
28     [EditorBrowsable(EditorBrowsableState.Never)]
29     public class WidgetViewSignal : Disposable
30     {
31
32         internal WidgetViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
33         {
34         }
35
36
37         /// This will not be public opened.
38         [EditorBrowsable(EditorBrowsableState.Never)]
39         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
40         {
41             Interop.WidgetView.DeleteWidgetViewSignal(swigCPtr);
42         }
43
44         /// <summary>
45         /// Queries whether there are any connected slots.
46         /// </summary>
47         /// <returns>True if there are any slots connected to the signal</returns>
48         /// <since_tizen> 3 </since_tizen>
49         [Obsolete("Deprecated in API6, Will be removed in API9, Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
50         [EditorBrowsable(EditorBrowsableState.Never)]
51         public bool Empty()
52         {
53             bool ret = Interop.WidgetView.WidgetViewSignalEmpty(SwigCPtr);
54             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55             return ret;
56         }
57
58         /// <summary>
59         /// Queries the number of slots.
60         /// </summary>
61         /// <returns>The number of slots connected to this signal</returns>
62         /// <since_tizen> 3 </since_tizen>
63         [Obsolete("Deprecated in API6, Will be removed in API9, Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
64         [EditorBrowsable(EditorBrowsableState.Never)]
65         public uint GetConnectionCount()
66         {
67             uint ret = Interop.WidgetView.WidgetViewSignalGetConnectionCount(SwigCPtr);
68             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69             return ret;
70         }
71
72         /// <summary>
73         /// Connects a function.
74         /// </summary>
75         /// <param name="func">The function to connect</param>
76         /// <since_tizen> 3 </since_tizen>
77         [Obsolete("Deprecated in API6, Will be removed in API9, Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         public void Connect(System.Delegate func)
80         {
81             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
82             {
83                 Interop.WidgetView.WidgetViewSignalConnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
84                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85             }
86         }
87
88         /// <summary>
89         /// Disconnects a function.
90         /// </summary>
91         /// <param name="func">The function to disconnect</param>
92         /// <since_tizen> 3 </since_tizen>
93         [Obsolete("Deprecated in API6, Will be removed in API9, Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
94         [EditorBrowsable(EditorBrowsableState.Never)]
95         public void Disconnect(System.Delegate func)
96         {
97             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
98             {
99                 Interop.WidgetView.WidgetViewSignalDisconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
100                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101             }
102         }
103
104         /// <summary>
105         /// Connects a member function.
106         /// </summary>
107         /// <param name="arg">The member function to connect</param>
108         /// <since_tizen> 3 </since_tizen>
109         [Obsolete("Deprecated in API6, Will be removed in API9, Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
110         [EditorBrowsable(EditorBrowsableState.Never)]
111         public void Emit(WidgetView arg)
112         {
113             Interop.WidgetView.WidgetViewSignalEmit(SwigCPtr, WidgetView.getCPtr(arg));
114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115         }
116
117         /// <summary>
118         /// The contructor.
119         /// </summary>
120         /// <since_tizen> 3 </since_tizen>
121         [Obsolete("Deprecated in API6, Will be removed in API9, Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
122         [EditorBrowsable(EditorBrowsableState.Never)]
123         public WidgetViewSignal() : this(Interop.WidgetView.NewWidgetViewSignal(), true)
124         {
125             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126         }
127     }
128 }