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 LanguageChangedSignalType : Disposable
26 internal LanguageChangedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
31 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
33 Interop.LanguageChangedSignalType.DeleteLanguageChangedSignalType(swigCPtr);
37 /// Queries whether there are any connected slots.
39 /// <returns>True if there are any slots connected to the signal</returns>
42 bool ret = Interop.LanguageChangedSignalType.Empty(SwigCPtr);
43 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
48 /// Queries the number of slots.
50 /// <returns>The number of slots connected to this signal</returns>
51 public uint GetConnectionCount()
53 uint ret = Interop.LanguageChangedSignalType.GetConnectionCount(SwigCPtr);
54 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
59 /// Connects a member function.
61 /// <param name="func">The member function to connect</param>
62 public void Connect(System.Delegate func)
64 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
66 Interop.LanguageChangedSignalType.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72 /// Disconnects a function.
74 /// <param name="func">The function to disconnect</param>
75 public void Disconnect(System.Delegate func)
77 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
79 Interop.LanguageChangedSignalType.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87 public void Emit(int arg)
89 Interop.LanguageChangedSignalType.Emit(SwigCPtr, arg);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96 public LanguageChangedSignalType() : this(Interop.LanguageChangedSignalType.NewLanguageChangedSignalType(), true)
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();