Revert "[NUI] Rebase DevelNUI (#2507)" (#2508)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / LanguageChangedSignalType.cs
1 /*
2  * Copyright(c) 2019 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17 using System;
18 using System.Runtime.InteropServices;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     internal class LanguageChangedSignalType : Disposable
24     {
25
26         internal LanguageChangedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
27         {
28         }
29
30
31         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
32         {
33             Interop.LanguageChangedSignalType.DeleteLanguageChangedSignalType(swigCPtr);
34         }
35
36         /// <summary>
37         /// Queries whether there are any connected slots.
38         /// </summary>
39         /// <returns>True if there are any slots connected to the signal</returns>
40         /// <since_tizen> 4 </since_tizen>
41         public bool Empty()
42         {
43             bool ret = Interop.LanguageChangedSignalType.Empty(SwigCPtr);
44             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
45             return ret;
46         }
47
48         /// <summary>
49         /// Queries the number of slots.
50         /// </summary>
51         /// <returns>The number of slots connected to this signal</returns>
52         /// <since_tizen> 4 </since_tizen>
53         public uint GetConnectionCount()
54         {
55             uint ret = Interop.LanguageChangedSignalType.GetConnectionCount(SwigCPtr);
56             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57             return ret;
58         }
59
60         /// <summary>
61         /// Connects a member function.
62         /// </summary>
63         /// <param name="func">The member function to connect</param>
64         /// <since_tizen> 4 </since_tizen>
65         public void Connect(System.Delegate func)
66         {
67             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
68             {
69                 Interop.LanguageChangedSignalType.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
70                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71             }
72         }
73
74         /// <summary>
75         /// Disconnects a function.
76         /// </summary>
77         /// <param name="func">The function to disconnect</param>
78         /// <since_tizen> 4 </since_tizen>
79         public void Disconnect(System.Delegate func)
80         {
81             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
82             {
83                 Interop.LanguageChangedSignalType.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
84                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85             }
86         }
87
88         /// <summary>
89         /// Emits the signal.
90         /// </summary>
91         /// <since_tizen> 4 </since_tizen>
92         public void Emit(int arg)
93         {
94             Interop.LanguageChangedSignalType.Emit(SwigCPtr, arg);
95             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96         }
97
98         /// <summary>
99         /// The contructor.
100         /// </summary>
101         /// <since_tizen> 4 </since_tizen>
102         public LanguageChangedSignalType() : this(Interop.LanguageChangedSignalType.NewLanguageChangedSignalType(), true)
103         {
104             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105         }
106     }
107 }