2 * Copyright(c) 2017 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.
17 using System.ComponentModel;
22 /// public class AdaptorSignalType : global::System.IDisposable
24 /// <since_tizen> 4 </since_tizen>
25 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public class AdaptorSignalType : global::System.IDisposable
29 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33 /// <since_tizen> 4 </since_tizen>
34 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 protected bool swigCMemOwn;
38 internal AdaptorSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
40 swigCMemOwn = cMemoryOwn;
41 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
44 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AdaptorSignalType obj)
46 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
52 /// <since_tizen> 3 </since_tizen>
53 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
54 [EditorBrowsable(EditorBrowsableState.Never)]
63 /// <since_tizen> 4 </since_tizen>
64 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 public virtual void Dispose()
70 if (swigCPtr.Handle != global::System.IntPtr.Zero)
75 Interop.Adaptor.delete_AdaptorSignalType(swigCPtr);
77 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
79 global::System.GC.SuppressFinalize(this);
84 /// Queries whether there are any connected slots.
86 /// <returns>True if there are any slots connected to the signal</returns>
87 /// <since_tizen> 4 </since_tizen>
88 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
89 [EditorBrowsable(EditorBrowsableState.Never)]
92 bool ret = Interop.Adaptor.AdaptorSignalType_Empty(swigCPtr);
93 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 /// Queries the number of slots.
100 /// <returns>The number of slots connected to this signal</returns>
101 /// <since_tizen> 4 </since_tizen>
102 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 public uint GetConnectionCount()
106 uint ret = Interop.Adaptor.AdaptorSignalType_GetConnectionCount(swigCPtr);
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112 /// Connects a function.
114 /// <param name="func">The function to connect</param>
115 /// <since_tizen> 4 </since_tizen>
116 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
117 [EditorBrowsable(EditorBrowsableState.Never)]
118 public void Connect(System.Delegate func)
120 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
122 Interop.Adaptor.AdaptorSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 /// Disconnects a function.
130 /// <param name="func">The function to disconnect</param>
131 /// <since_tizen> 4 </since_tizen>
132 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
133 [EditorBrowsable(EditorBrowsableState.Never)]
134 public void Disconnect(System.Delegate func)
136 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
138 Interop.Adaptor.AdaptorSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 /// Emits the signal.
146 /// <param name="arg">The first value to pass to callbacks</param>
147 /// <since_tizen> 4 </since_tizen>
148 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
149 [EditorBrowsable(EditorBrowsableState.Never)]
150 public void Emit(Adaptor arg)
152 Interop.Adaptor.AdaptorSignalType_Emit(swigCPtr, Adaptor.getCPtr(arg));
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 /// <since_tizen> 4 </since_tizen>
160 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
161 [EditorBrowsable(EditorBrowsableState.Never)]
162 public AdaptorSignalType() : this(Interop.Adaptor.new_AdaptorSignalType(), true)
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();