[NUI] TCSACR-226 code change (#1032)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / KeyboardTypeSignalType.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
18 using System;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     /// <summary>
24     /// KeyboardTypeSignalType
25     /// </summary>
26     /// <since_tizen> 4 </since_tizen>
27     [Obsolete("Deprecated in API6, Will be removed in API9, " + 
28         "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
29     [EditorBrowsable(EditorBrowsableState.Never)]
30     public class KeyboardTypeSignalType : Disposable
31     {
32         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33
34         /// <summary>
35         /// swigCMemOwn
36         /// </summary>
37         /// <since_tizen> 4 </since_tizen>
38         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
39             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
40         [EditorBrowsable(EditorBrowsableState.Never)]
41         protected bool swigCMemOwn;
42
43         internal KeyboardTypeSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
44         {
45             swigCMemOwn = cMemoryOwn;
46             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
47         }
48
49         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardTypeSignalType obj)
50         {
51             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
52         }
53
54         /// <summary>
55         /// Dispose
56         /// </summary>
57         /// <since_tizen> 4 </since_tizen>
58         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
59             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
60         [EditorBrowsable(EditorBrowsableState.Never)]
61         protected override void Dispose(DisposeTypes type)
62         {
63             if (disposed)
64             {
65                 return;
66             }
67
68             //Release your own unmanaged resources here.
69             //You should not access any managed member here except static instance.
70             //because the execution order of Finalizes is non-deterministic.
71
72             if (swigCPtr.Handle != global::System.IntPtr.Zero)
73             {
74                 if (swigCMemOwn)
75                 {
76                     swigCMemOwn = false;
77                     Interop.KeyboardTypeSignalType.delete_KeyboardTypeSignalType(swigCPtr);
78                 }
79                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
80             }
81
82             base.Dispose(type);
83         }
84
85         /// <summary>
86         /// Queries whether there are any connected slots.
87         /// </summary>
88         /// <returns>True if there are any slots connected to the signal</returns>
89         /// <since_tizen> 4 </since_tizen>
90         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
91             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
92         [EditorBrowsable(EditorBrowsableState.Never)]
93         public bool Empty()
94         {
95             bool ret = Interop.KeyboardTypeSignalType.KeyboardTypeSignalType_Empty(swigCPtr);
96             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97             return ret;
98         }
99
100         /// <summary>
101         /// Queries the number of slots.
102         /// </summary>
103         /// <returns>The number of slots connected to this signal</returns>
104         /// <since_tizen> 4 </since_tizen>
105         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
106             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
107         [EditorBrowsable(EditorBrowsableState.Never)]
108         public uint GetConnectionCount()
109         {
110             uint ret = Interop.KeyboardTypeSignalType.KeyboardTypeSignalType_GetConnectionCount(swigCPtr);
111             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112             return ret;
113         }
114
115         /// <summary>
116         /// Connects a function.
117         /// </summary>
118         /// <param name="func">The function to connect</param>
119         /// <since_tizen> 4 </since_tizen>
120         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
121             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
122         [EditorBrowsable(EditorBrowsableState.Never)]
123         public void Connect(System.Delegate func)
124         {
125             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
126             {
127                 Interop.KeyboardTypeSignalType.KeyboardTypeSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
128                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129             }
130         }
131
132         /// <summary>
133         /// Disconnects a function.
134         /// </summary>
135         /// <param name="func">The function to disconnect</param>
136         /// <since_tizen> 4 </since_tizen>
137         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
138             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
139         [EditorBrowsable(EditorBrowsableState.Never)]
140         public void Disconnect(System.Delegate func)
141         {
142             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
143             {
144                 Interop.KeyboardTypeSignalType.KeyboardTypeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
145                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146             }
147         }
148
149         /// <summary>
150         /// Connects a member function.
151         /// </summary>
152         /// <param name="arg">The member function to connect</param>
153         /// <since_tizen> 5 </since_tizen>
154         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
155             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
156         [EditorBrowsable(EditorBrowsableState.Never)]
157         public void Emit(InputMethodContext.KeyboardType arg)
158         {
159             Interop.KeyboardTypeSignalType.KeyboardTypeSignalType_Emit(swigCPtr, (int)arg);
160             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161         }
162
163         /// <summary>
164         /// The contructor.
165         /// </summary>
166         /// <since_tizen> 4 </since_tizen>
167         [Obsolete("Deprecated in API6, Will be removed in API9, " + 
168             "Please use InputMethodContext.KeyboardTypeChanged event instead!")]
169         [EditorBrowsable(EditorBrowsableState.Never)]
170         public KeyboardTypeSignalType() : this(Interop.KeyboardTypeSignalType.new_KeyboardTypeSignalType(), true)
171         {
172             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173         }
174     }
175 }