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;
24 /// Signal connection class for PropertyNotification
26 /// <since_tizen> 4 </since_tizen>
27 [Obsolete("Deprecated in API6, Will be removed in API9, " +
28 "Please use PropertyNotification.Notified event instead!")]
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public class PropertyNotifySignal : Disposable
36 /// <since_tizen> 4 </since_tizen>
37 [Obsolete("Deprecated in API6, Will be removed in API9, " +
38 "Please use PropertyNotification.Notified event instead!")]
39 [EditorBrowsable(EditorBrowsableState.Never)]
40 public PropertyNotifySignal() : this(Interop.PropertyNotifySignal.new_PropertyNotifySignal(), true)
42 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
45 internal PropertyNotifySignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
50 /// Queries whether there are any connected slots.
52 /// <returns>True if there are any slots connected to the signal.</returns>
53 /// <since_tizen> 4 </since_tizen>
54 [Obsolete("Deprecated in API6, Will be removed in API9, " +
55 "Please use PropertyNotification.Notified event instead!")]
56 [EditorBrowsable(EditorBrowsableState.Never)]
59 bool ret = Interop.PropertyNotifySignal.PropertyNotifySignal_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> 4 </since_tizen>
69 [Obsolete("Deprecated in API6, Will be removed in API9, " +
70 "Please use PropertyNotification.Notified event instead!")]
71 [EditorBrowsable(EditorBrowsableState.Never)]
72 public uint GetConnectionCount()
74 uint ret = Interop.PropertyNotifySignal.PropertyNotifySignal_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> 4 </since_tizen>
84 [Obsolete("Deprecated in API6, Will be removed in API9, " +
85 "Please use PropertyNotification.Notified event 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.PropertyNotifySignal.PropertyNotifySignal_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> 4 </since_tizen>
101 [Obsolete("Deprecated in API6, Will be removed in API9, " +
102 "Please use PropertyNotification.Notified event 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.PropertyNotifySignal.PropertyNotifySignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 /// Emits a signal with 1 parameter.
116 /// <param name="arg">The first value to pass to callbacks.</param>
117 /// <since_tizen> 4 </since_tizen>
118 [Obsolete("Deprecated in API6, Will be removed in API9, " +
119 "Please use PropertyNotification.Notified event instead!")]
120 [EditorBrowsable(EditorBrowsableState.Never)]
121 public void Emit(PropertyNotification arg)
123 Interop.PropertyNotifySignal.PropertyNotifySignal_Emit(swigCPtr, PropertyNotification.getCPtr(arg));
124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 /// This will not be public opened.
129 [EditorBrowsable(EditorBrowsableState.Never)]
130 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
132 Interop.PropertyNotifySignal.delete_PropertyNotifySignal(swigCPtr);