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)
30 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ActivatedSignalType obj)
32 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38 /// <since_tizen> 3 </since_tizen>
39 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
41 Interop.ActivatedSignalType.delete_ActivatedSignalType(swigCPtr);
45 /// Queries whether there are any connected slots.
47 /// <returns>True if there are any slots connected to the signal</returns>
48 /// <since_tizen> 3 </since_tizen>
51 bool ret = Interop.ActivatedSignalType.ActivatedSignalType_Empty(swigCPtr);
52 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57 /// Queries the number of slots.
59 /// <returns>The number of slots connected to this signal</returns>
60 /// <since_tizen> 3 </since_tizen>
61 public uint GetConnectionCount()
63 uint ret = Interop.ActivatedSignalType.ActivatedSignalType_GetConnectionCount(swigCPtr);
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 /// Connects a function.
71 /// <param name="func">The function to connect</param>
72 /// <since_tizen> 3 </since_tizen>
73 public void Connect(System.Delegate func)
75 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
77 Interop.ActivatedSignalType.ActivatedSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83 /// Disconnects a function.
85 /// <param name="func">The function to disconnect</param>
86 /// <since_tizen> 3 </since_tizen>
87 public void Disconnect(System.Delegate func)
89 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
91 Interop.ActivatedSignalType.ActivatedSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
92 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99 /// <param name="arg">The first value to pass to callbacks</param>
100 /// <since_tizen> 5 </since_tizen>
101 public void Emit(InputMethodContext arg)
103 Interop.ActivatedSignalType.ActivatedSignalType_Emit(swigCPtr, InputMethodContext.getCPtr(arg));
104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 /// <since_tizen> 3 </since_tizen>
111 public ActivatedSignalType() : this(Interop.ActivatedSignalType.new_ActivatedSignalType(), true)
113 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();