2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 using System.ComponentModel;
26 /// <since_tizen> 3 </since_tizen>
27 [Obsolete("Deprecated in API6, Will be removed in API9, " +
28 "Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public class WidgetViewSignal : Disposable
33 internal WidgetViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
37 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetViewSignal obj)
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 /// This will not be public opened.
43 [EditorBrowsable(EditorBrowsableState.Never)]
44 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
46 Interop.WidgetView.delete_WidgetViewSignal(swigCPtr);
50 /// Queries whether there are any connected slots.
52 /// <returns>True if there are any slots connected to the signal</returns>
53 /// <since_tizen> 3 </since_tizen>
54 [Obsolete("Deprecated in API6, Will be removed in API9, " +
55 "Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
56 [EditorBrowsable(EditorBrowsableState.Never)]
59 bool ret = Interop.WidgetView.WidgetViewSignal_Empty(swigCPtr);
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 /// Queries the number of slots.
67 /// <returns>The number of slots connected to this signal</returns>
68 /// <since_tizen> 3 </since_tizen>
69 [Obsolete("Deprecated in API6, Will be removed in API9, " +
70 "Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
71 [EditorBrowsable(EditorBrowsableState.Never)]
72 public uint GetConnectionCount()
74 uint ret = Interop.WidgetView.WidgetViewSignal_GetConnectionCount(swigCPtr);
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 /// Connects a function.
82 /// <param name="func">The function to connect</param>
83 /// <since_tizen> 3 </since_tizen>
84 [Obsolete("Deprecated in API6, Will be removed in API9, " +
85 "Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
86 [EditorBrowsable(EditorBrowsableState.Never)]
87 public void Connect(System.Delegate func)
89 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
91 Interop.WidgetView.WidgetViewSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
92 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 /// Disconnects a function.
99 /// <param name="func">The function to disconnect</param>
100 /// <since_tizen> 3 </since_tizen>
101 [Obsolete("Deprecated in API6, Will be removed in API9, " +
102 "Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 public void Disconnect(System.Delegate func)
106 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
108 Interop.WidgetView.WidgetViewSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 /// Connects a member function.
116 /// <param name="arg">The member function to connect</param>
117 /// <since_tizen> 3 </since_tizen>
118 [Obsolete("Deprecated in API6, Will be removed in API9, " +
119 "Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
120 [EditorBrowsable(EditorBrowsableState.Never)]
121 public void Emit(WidgetView arg)
123 Interop.WidgetView.WidgetViewSignal_Emit(swigCPtr, WidgetView.getCPtr(arg));
124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130 /// <since_tizen> 3 </since_tizen>
131 [Obsolete("Deprecated in API6, Will be removed in API9, " +
132 "Please use WidgetView.WidgetAdded, WidgetDeleted events instead!")]
133 [EditorBrowsable(EditorBrowsableState.Never)]
134 public WidgetViewSignal() : this(Interop.WidgetView.new_WidgetViewSignal(), true)
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();