2 * Copyright(c) 2017 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;
24 /// Please do not use! this will be deprecated
26 /// <since_tizen> 4 </since_tizen>
27 [EditorBrowsable(EditorBrowsableState.Never)]
28 public class KeyboardResizedSignalType : global::System.IDisposable
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 /// KeyboardResizedSignalType
34 /// <since_tizen> 4 </since_tizen>
35 protected bool swigCMemOwn;
37 internal KeyboardResizedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
39 swigCMemOwn = cMemoryOwn;
40 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
43 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardResizedSignalType obj)
45 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48 //A Flag to check who called Dispose(). (By User or DisposeQueue)
49 private bool isDisposeQueued = false;
51 /// A Flat to check if it is already disposed.
53 /// <since_tizen> 4 </since_tizen>
54 protected bool disposed = false;
59 ~KeyboardResizedSignalType()
63 isDisposeQueued = true;
64 DisposeQueue.Instance.Add(this);
71 /// <since_tizen> 4 </since_tizen>
74 //Throw excpetion if Dispose() is called in separate thread.
75 if (!Window.IsInstalled())
77 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
82 Dispose(DisposeTypes.Implicit);
86 Dispose(DisposeTypes.Explicit);
87 System.GC.SuppressFinalize(this);
94 /// <since_tizen> 4 </since_tizen>
95 protected virtual void Dispose(DisposeTypes type)
102 if (type == DisposeTypes.Explicit)
105 //Release your own managed resources here.
106 //You should release all of your own disposable objects here.
110 //Release your own unmanaged resources here.
111 //You should not access any managed member here except static instance.
112 //because the execution order of Finalizes is non-deterministic.
114 if (swigCPtr.Handle != global::System.IntPtr.Zero)
119 NDalicManualPINVOKE.delete_KeyboardResizedSignalType(swigCPtr);
121 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
128 /// Queries whether there are any connected slots.
130 /// <returns>True if there are any slots connected to the signal</returns>
131 /// <since_tizen> 4 </since_tizen>
134 bool ret = NDalicManualPINVOKE.KeyboardResizedSignalType_Empty(swigCPtr);
135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 /// Queries the number of slots.
142 /// <returns>The number of slots connected to this signal</returns>
143 /// <since_tizen> 4 </since_tizen>
144 public uint GetConnectionCount()
146 uint ret = NDalicManualPINVOKE.KeyboardResizedSignalType_GetConnectionCount(swigCPtr);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 /// Connects a function.
154 /// <param name="func">The function to connect</param>
155 /// <since_tizen> 4 </since_tizen>
156 public void Connect(System.Delegate func)
158 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
160 NDalicManualPINVOKE.KeyboardResizedSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 /// Disconnects a function.
168 /// <param name="func">The function to disconnect</param>
169 /// <since_tizen> 4 </since_tizen>
170 public void Disconnect(System.Delegate func)
172 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
174 NDalicManualPINVOKE.KeyboardResizedSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 /// Connects a member function.
182 /// <param name="arg">The member function to connect</param>
183 /// <since_tizen> 4 </since_tizen>
184 public void Emit(int arg)
186 NDalicManualPINVOKE.KeyboardResizedSignalType_Emit(swigCPtr, arg);
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 /// <since_tizen> 4 </since_tizen>
194 public KeyboardResizedSignalType() : this(NDalicManualPINVOKE.new_KeyboardResizedSignalType(), true)
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();