2 * Copyright(c) 2021 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
25 internal LanguageChangedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
29 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
31 Interop.LanguageChangedSignalType.DeleteLanguageChangedSignalType(swigCPtr);
35 /// Queries whether there are any connected slots.
37 /// <returns>True if there are any slots connected to the signal</returns>
40 bool ret = Interop.LanguageChangedSignalType.Empty(SwigCPtr);
41 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
46 /// Queries the number of slots.
48 /// <returns>The number of slots connected to this signal</returns>
49 public uint GetConnectionCount()
51 uint ret = Interop.LanguageChangedSignalType.GetConnectionCount(SwigCPtr);
52 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57 /// Connects a member function.
59 /// <param name="func">The member function to connect</param>
60 public void Connect(System.Delegate func)
62 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
64 Interop.LanguageChangedSignalType.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
65 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 /// Disconnects a function.
72 /// <param name="func">The function to disconnect</param>
73 public void Disconnect(System.Delegate func)
75 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
77 Interop.LanguageChangedSignalType.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85 public void Emit(int arg)
87 Interop.LanguageChangedSignalType.Emit(SwigCPtr, arg);
88 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 public LanguageChangedSignalType() : this(Interop.LanguageChangedSignalType.NewLanguageChangedSignalType(), true)
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();