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.
18 using System.Runtime.InteropServices;
19 using System.ComponentModel;
23 internal class ActivatedSignalType : Disposable
26 internal ActivatedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
33 /// <since_tizen> 3 </since_tizen>
34 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
36 Interop.ActivatedSignalType.DeleteActivatedSignalType(swigCPtr);
40 /// Queries whether there are any connected slots.
42 /// <returns>True if there are any slots connected to the signal</returns>
43 /// <since_tizen> 3 </since_tizen>
46 bool ret = Interop.ActivatedSignalType.ActivatedSignalTypeEmpty(swigCPtr);
47 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52 /// Queries the number of slots.
54 /// <returns>The number of slots connected to this signal</returns>
55 /// <since_tizen> 3 </since_tizen>
56 public uint GetConnectionCount()
58 uint ret = Interop.ActivatedSignalType.ActivatedSignalTypeGetConnectionCount(swigCPtr);
59 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64 /// Connects a function.
66 /// <param name="func">The function to connect</param>
67 /// <since_tizen> 3 </since_tizen>
68 public void Connect(System.Delegate func)
70 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
72 Interop.ActivatedSignalType.ActivatedSignalTypeConnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 /// Disconnects a function.
80 /// <param name="func">The function to disconnect</param>
81 /// <since_tizen> 3 </since_tizen>
82 public void Disconnect(System.Delegate func)
84 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
86 Interop.ActivatedSignalType.ActivatedSignalTypeDisconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
87 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 /// <param name="arg">The first value to pass to callbacks</param>
95 /// <since_tizen> 5 </since_tizen>
96 public void Emit(InputMethodContext arg)
98 Interop.ActivatedSignalType.ActivatedSignalTypeEmit(swigCPtr, InputMethodContext.getCPtr(arg));
99 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 /// <since_tizen> 3 </since_tizen>
106 public ActivatedSignalType() : this(Interop.ActivatedSignalType.NewActivatedSignalType(), true)
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();