[NUI] Fix build warning & clean code [CA1051]
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / KeyboardResizedSignalType.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 KeyboardResizedSignalType : Disposable
24     {
25
26         internal KeyboardResizedSignalType(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.KeyboardResizedSignalType.DeleteKeyboardResizedSignalType(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.KeyboardResizedSignalType.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.KeyboardResizedSignalType.GetConnectionCount(SwigCPtr);
56             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57             return ret;
58         }
59
60         /// <summary>
61         /// Connects a function.
62         /// </summary>
63         /// <param name="func">The 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.KeyboardResizedSignalType.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.KeyboardResizedSignalType.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
84                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85             }
86         }
87
88         /// <summary>
89         /// Connects a member function.
90         /// </summary>
91         /// <param name="arg">The member function to connect</param>
92         /// <since_tizen> 4 </since_tizen>
93         public void Emit(int arg)
94         {
95             Interop.KeyboardResizedSignalType.Emit(SwigCPtr, arg);
96             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97         }
98
99         /// <summary>
100         /// The contructor.
101         /// </summary>
102         /// <since_tizen> 4 </since_tizen>
103         public KeyboardResizedSignalType() : this(Interop.KeyboardResizedSignalType.NewKeyboardResizedSignalType(), true)
104         {
105             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106         }
107     }
108 }