From 047e71dae3ad447f180adc11da8bdbe4f8ea4e94 Mon Sep 17 00:00:00 2001 From: "xb.teng" Date: Thu, 13 Jul 2017 15:24:14 +0800 Subject: [PATCH] Update ImfManager Change-Id: Ie880cf6be0a6949a965f6cd3306b1b3ab4e35606 --- src/Tizen.NUI/src/internal/ActivatedSignalType.cs | 146 +++ src/Tizen.NUI/src/internal/ImfEventSignalType.cs | 147 +++ src/Tizen.NUI/src/internal/ImfVoidSignalType.cs | 152 +++ src/Tizen.NUI/src/internal/InputMethodOptions.cs | 133 +++ .../src/internal/KeyboardTypeSignalType.cs | 146 +++ src/Tizen.NUI/src/internal/StatusSignalType.cs | 146 +++ src/Tizen.NUI/src/public/ImfManager.cs | 1006 +++++++------------- 7 files changed, 1226 insertions(+), 650 deletions(-) create mode 100755 src/Tizen.NUI/src/internal/ActivatedSignalType.cs create mode 100755 src/Tizen.NUI/src/internal/ImfEventSignalType.cs create mode 100755 src/Tizen.NUI/src/internal/ImfVoidSignalType.cs create mode 100755 src/Tizen.NUI/src/internal/InputMethodOptions.cs create mode 100755 src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs create mode 100755 src/Tizen.NUI/src/internal/StatusSignalType.cs diff --git a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs new file mode 100755 index 0000000..4e1c714 --- /dev/null +++ b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs @@ -0,0 +1,146 @@ +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +namespace Tizen.NUI +{ + + internal class ActivatedSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ActivatedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ActivatedSignalType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ActivatedSignalType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ActivatedSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.ActivatedSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.ActivatedSignalType_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.ActivatedSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.ActivatedSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(ImfManager arg) + { + NDalicManualPINVOKE.ActivatedSignalType_Emit(swigCPtr, ImfManager.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ActivatedSignalType() : this(NDalicManualPINVOKE.new_ActivatedSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/ImfEventSignalType.cs b/src/Tizen.NUI/src/internal/ImfEventSignalType.cs new file mode 100755 index 0000000..1ccbdc8 --- /dev/null +++ b/src/Tizen.NUI/src/internal/ImfEventSignalType.cs @@ -0,0 +1,147 @@ +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +namespace Tizen.NUI +{ + + internal class ImfEventSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ImfEventSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventSignalType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ImfEventSignalType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ImfEventSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.ImfEventSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.ImfEventSignalType_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.ImfEventSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.ImfEventSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public ImfManager.ImfCallbackData Emit(ImfManager arg1, ImfManager.ImfEventData arg2) + { + ImfManager.ImfCallbackData ret = new ImfManager.ImfCallbackData(NDalicManualPINVOKE.ImfEventSignalType_Emit(swigCPtr, ImfManager.getCPtr(arg1), ImfManager.ImfEventData.getCPtr(arg2)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public ImfEventSignalType() : this(NDalicManualPINVOKE.new_ImfEventSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs b/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs new file mode 100755 index 0000000..549be57 --- /dev/null +++ b/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs @@ -0,0 +1,152 @@ +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +namespace Tizen.NUI +{ + + internal class ImfVoidSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ImfVoidSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfVoidSignalType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~ImfVoidSignalType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.delete_ImfVoidSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public ImfVoidSignalType() : this(NDalicManualPINVOKE.new_ImfVoidSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.ImfVoidSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.ImfVoidSignalType_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.ImfVoidSignalType_Connect__SWIG_0(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.ImfVoidSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Connect(ConnectionTrackerInterface connectionTracker, SWIGTYPE_p_Dali__FunctorDelegate arg1) + { + NDalicManualPINVOKE.ImfVoidSignalType_Connect__SWIG_4(swigCPtr, ConnectionTrackerInterface.getCPtr(connectionTracker), SWIGTYPE_p_Dali__FunctorDelegate.getCPtr(arg1)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Emit() + { + NDalicManualPINVOKE.ImfVoidSignalType_Emit(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/InputMethodOptions.cs b/src/Tizen.NUI/src/internal/InputMethodOptions.cs new file mode 100755 index 0000000..09b69a0 --- /dev/null +++ b/src/Tizen.NUI/src/internal/InputMethodOptions.cs @@ -0,0 +1,133 @@ +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +namespace Tizen.NUI +{ + + internal class InputMethodOptions : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal InputMethodOptions(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(InputMethodOptions obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~InputMethodOptions() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.delete_InputMethodOptions(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public InputMethodOptions() : this(NDalicManualPINVOKE.new_InputMethodOptions(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool IsPassword() + { + bool ret = NDalicManualPINVOKE.InputMethodOptions_IsPassword(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void ApplyProperty(PropertyMap settings) + { + NDalicManualPINVOKE.InputMethodOptions_ApplyProperty(swigCPtr, PropertyMap.getCPtr(settings)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RetrieveProperty(PropertyMap settings) + { + NDalicManualPINVOKE.InputMethodOptions_RetrieveProperty(swigCPtr, PropertyMap.getCPtr(settings)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool CompareAndSet(InputMethod.CategoryType type, InputMethodOptions options, SWIGTYPE_p_int index) + { + bool ret = NDalicManualPINVOKE.InputMethodOptions_CompareAndSet(swigCPtr, (int)type, InputMethodOptions.getCPtr(options), SWIGTYPE_p_int.getCPtr(index)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs new file mode 100755 index 0000000..6d8670d --- /dev/null +++ b/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs @@ -0,0 +1,146 @@ +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +namespace Tizen.NUI +{ + + public class KeyboardTypeSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal KeyboardTypeSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardTypeSignalType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~KeyboardTypeSignalType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.delete_KeyboardTypeSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.KeyboardTypeSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.KeyboardTypeSignalType_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.KeyboardTypeSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.KeyboardTypeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(ImfManager.KeyboardType arg) + { + NDalicManualPINVOKE.KeyboardTypeSignalType_Emit(swigCPtr, (int)arg); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public KeyboardTypeSignalType() : this(NDalicManualPINVOKE.new_KeyboardTypeSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/StatusSignalType.cs b/src/Tizen.NUI/src/internal/StatusSignalType.cs new file mode 100755 index 0000000..4c9de84 --- /dev/null +++ b/src/Tizen.NUI/src/internal/StatusSignalType.cs @@ -0,0 +1,146 @@ +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +namespace Tizen.NUI +{ + + internal class StatusSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal StatusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StatusSignalType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + ~StatusSignalType() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicManualPINVOKE.delete_StatusSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.StatusSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.StatusSignalType_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.StatusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.StatusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(bool arg) + { + NDalicManualPINVOKE.StatusSignalType_Emit(swigCPtr, arg); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public StatusSignalType() : this(NDalicManualPINVOKE.new_StatusSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/public/ImfManager.cs b/src/Tizen.NUI/src/public/ImfManager.cs index 34122ea..82dcf4d 100755 --- a/src/Tizen.NUI/src/public/ImfManager.cs +++ b/src/Tizen.NUI/src/public/ImfManager.cs @@ -13,13 +13,14 @@ * limitations under the License. * */ +using System; +using System.Runtime.InteropServices; namespace Tizen.NUI { - using System; - using System.Runtime.InteropServices; - - + /// + /// Specifically manages the ecore input method framework which enables the virtual or hardware keyboards. + /// public class ImfManager : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -70,6 +71,9 @@ namespace Tizen.NUI base.Dispose(type); } + /// + /// This structure is used to pass on data from the IMF regarding predictive text. + /// public class ImfEventData : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -101,6 +105,9 @@ namespace Tizen.NUI } } + /// + /// Dispose pattern + /// public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. @@ -152,17 +159,37 @@ namespace Tizen.NUI disposed = true; } + internal static ImfEventData GetImfEventDataFromPtr(global::System.IntPtr cPtr) + { + ImfEventData ret = new ImfEventData(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Default Constructor + /// public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Constructor + /// + /// The name of the event from the IMF. + /// The pre-edit or commit string. + /// Start position from the current cursor position to start deleting characters. + /// The number of characters to delete from the cursorOffset. public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public string predictiveString + /// + /// The pre-edit or commit string. + /// + public string PredictiveString { set { @@ -177,7 +204,10 @@ namespace Tizen.NUI } } - public ImfManager.ImfEvent eventName + /// + /// The name of the event from the IMF. + /// + public ImfManager.ImfEvent EventName { set { @@ -192,7 +222,10 @@ namespace Tizen.NUI } } - public int cursorOffset + /// + /// Start position from the current cursor position to start deleting characters. + /// + public int CursorOffset { set { @@ -207,7 +240,10 @@ namespace Tizen.NUI } } - public int numberOfChars + /// + /// Number of characters to delete from the cursorOffset. + /// + public int NumberOfChars { set { @@ -224,6 +260,9 @@ namespace Tizen.NUI } + /// + /// Data required by IMF from the callback. + /// public class ImfCallbackData : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -255,6 +294,9 @@ namespace Tizen.NUI } } + /// + /// Dispose pattern + /// public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. @@ -306,17 +348,37 @@ namespace Tizen.NUI disposed = true; } + internal static ImfCallbackData GetImfCallbackDataFromPtr(global::System.IntPtr cPtr) + { + ImfCallbackData ret = new ImfCallbackData(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Default Constructor + /// public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Constructor + /// + /// True if cursor position needs to be updated. + /// New position of cursor. + /// Current text string. + /// Flag if preedit reset is required. public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public string currentText + /// + /// Current text string. + /// + public string CurrentText { set { @@ -331,7 +393,10 @@ namespace Tizen.NUI } } - public int cursorPosition + /// + /// Current text string. + /// + public int CursorPosition { set { @@ -346,7 +411,10 @@ namespace Tizen.NUI } } - public bool update + /// + /// If cursor position needs to be updated. + /// + public bool Update { set { @@ -361,7 +429,10 @@ namespace Tizen.NUI } } - public bool preeditResetRequired + /// + /// Flag if preedit reset is required. + /// + public bool PreeditResetRequired { set { @@ -378,6 +449,10 @@ namespace Tizen.NUI } + /// + /// Retrieve a handle to the instance of ImfManager. + /// + /// A handle to the ImfManager. public static ImfManager Get() { ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true); @@ -385,18 +460,32 @@ namespace Tizen.NUI return ret; } + /// + /// Activate the IMF.
+ /// It means that the text editing is started at somewhere.
+ /// If the H/W keyboard isn't connected then it will show the virtual keyboard. + ///
public void Activate() { NDalicManualPINVOKE.ImfManager_Activate(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Deactivate the IMF.
+ /// It means that the text editing is finished at somewhere. + ///
public void Deactivate() { NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Get the restoration status, which controls if the keyboard is restored after the focus lost then regained.
+ /// If true then keyboard will be restored (activated) after focus is regained. + ///
+ /// Restoration status. public bool RestoreAfterFocusLost() { bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr); @@ -404,30 +493,48 @@ namespace Tizen.NUI return ret; } + /// + /// Set status whether the IMF has to restore the keyboard after losing focus. + /// + /// True means that keyboard should be restored after focus lost and regained. public void SetRestoreAfterFocusLost(bool toggle) { NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Send message reset the pred-edit state / imf module. + /// public new void Reset() { NDalicManualPINVOKE.ImfManager_Reset(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Notifies IMF context that the cursor position has changed, required for features like auto-capitalisation. + /// public void NotifyCursorPosition() { NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Sets cursor position stored in VirtualKeyboard, this is required by the IMF context. + /// + /// Position of cursor. public void SetCursorPosition(uint cursorPosition) { NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Gets cursor position stored in VirtualKeyboard, this is required by the IMF context. + /// + /// Current position of cursor public uint GetCursorPosition() { uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr); @@ -435,12 +542,20 @@ namespace Tizen.NUI return ret; } + /// + /// Method to store the string required by the IMF, this is used to provide predictive word suggestions. + /// + /// The text string surrounding the current cursor point. public void SetSurroundingText(string text) { NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Gets current text string set within the IMF manager, this is used to offer predictive suggestions. + /// + /// Surrounding text. public string GetSurroundingText() { string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr); @@ -448,12 +563,20 @@ namespace Tizen.NUI return ret; } + /// + /// Notifies IMF context that text input is set to multi line or not. + /// + /// True if multiline text input is used. public void NotifyTextInputMultiLine(bool multiLine) { NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Returns text direction of the keyboard's current input language. + /// + /// The direction of the text. public ImfManager.TextDirection GetTextDirection() { ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr); @@ -461,6 +584,14 @@ namespace Tizen.NUI return ret; } + /// + /// Provides size and position of keyboard.
+ /// Position is relative to whether keyboard is visible or not.
+ /// If keyboard is not visible then position will be off the screen.
+ /// If keyboard is not being shown when this method is called the keyboard is partially setup (IMFContext) to get
+ /// the values then taken down. So ideally GetInputMethodArea() should be called after Show(). + ///
+ /// Rectangle which is keyboard panel x, y, width, height public Rectangle GetInputMethodArea() { Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true); @@ -468,24 +599,36 @@ namespace Tizen.NUI return ret; } - internal void ApplyOptions(SWIGTYPE_p_InputMethodOptions options) + internal void ApplyOptions(InputMethodOptions options) { - NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, SWIGTYPE_p_InputMethodOptions.getCPtr(options)); + NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Sets up the input-panel specific data. + /// + /// The specific data to be set to the input panel. public void SetInputPanelUserData(string text) { NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public void GetInputPanelUserData(string text) + /// + /// Gets the specific data of the current active input panel. + /// + /// The specific data to be got from the input panel. + public void GetInputPanelUserData(out string text) { - NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, text); + NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Gets the state of the current active input panel. + /// + /// The state of the input panel. public ImfManager.State GetInputPanelState() { ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr); @@ -493,104 +636,77 @@ namespace Tizen.NUI return ret; } + /// + /// Sets the return key on the input panel to be visible or invisible.
+ /// The default is true. + ///
+ /// True if the return key is visible(enabled), false otherwise. public void SetReturnKeyState(bool visible) { NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Enable to show the input panel automatically when focused. + /// + /// If true, the input panel will be shown when focused. public void AutoEnableInputPanel(bool enabled) { NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Shows the input panel. + /// public void ShowInputPanel() { NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Hides the input panel. + /// public void HideInputPanel() { NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /* - public SWIGTYPE_p_Dali__SignalT_void_fDali__ImfManager_RF_t ActivatedSignal() - { - SWIGTYPE_p_Dali__SignalT_void_fDali__ImfManager_RF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__ImfManager_RF_t(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_Dali__SignalT_Dali__ImfManager__ImfCallbackData_fDali__ImfManager_R_Dali__ImfManager__ImfEventData_const_RF_t EventReceivedSignal() - { - SWIGTYPE_p_Dali__SignalT_Dali__ImfManager__ImfCallbackData_fDali__ImfManager_R_Dali__ImfManager__ImfEventData_const_RF_t ret = new SWIGTYPE_p_Dali__SignalT_Dali__ImfManager__ImfCallbackData_fDali__ImfManager_R_Dali__ImfManager__ImfEventData_const_RF_t(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public WindowFocusSignalType StatusChangedSignal() - { - WindowFocusSignalType ret = new WindowFocusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public VoidSignal ResizedSignal() + /// + /// Gets the keyboard type.
+ /// The default keyboard type is SoftwareKeyboard. + ///
+ /// The keyboard type + public ImfManager.KeyboardType GetKeyboardType() { - VoidSignal ret = new VoidSignal(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false); + ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - public VoidSignal LanguageChangedSignal() + /// + /// Gets the current language locale of the input panel.
+ /// Ex) en_US, en_GB, en_PH, fr_FR, ... + ///
+ /// The current language locale of the input panel. + public string GetInputPanelLocale() { - VoidSignal ret = new VoidSignal(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false); + string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - */ - public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager__SWIG_0(), true) + /// + /// Constructor + /// + public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal ImfManager(SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager imfManager) : this(NDalicManualPINVOKE.new_ImfManager__SWIG_1(SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager.getCPtr(imfManager)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum TextDirection - { - LeftToRight, - RightToLeft - } - - public enum ImfEvent - { - VOID, - PREEDIT, - COMMIT, - DELETESURROUNDING, - GETSURROUNDING, - PRIVATECOMMAND - } - - public enum State - { - DEFAULT, - SHOW, - HIDE, - WILL_SHOW - } - - - - /////////////////////////////////////////////////////////////////////////////// internal static ImfManager GetImfManagerFromPtr(global::System.IntPtr cPtr) { ImfManager ret = new ImfManager(cPtr, false); @@ -598,6 +714,9 @@ namespace Tizen.NUI return ret; } + /// + /// ImfManager activated event arguments. + /// public class ImfManagerActivatedEventArgs : EventArgs { public ImfManager ImfManager @@ -613,6 +732,9 @@ namespace Tizen.NUI private event EventHandler _imfManagerActivatedEventHandler; + /// + /// ImfManager activated. + /// public event EventHandler ImfManagerActivated { add @@ -648,14 +770,16 @@ namespace Tizen.NUI } } - public ActivatedSignalType ActivatedSignal() + internal ActivatedSignalType ActivatedSignal() { ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - // EventReceivedSignal + /// + /// ImfManager event received event arguments. + /// public class ImfManagerEventReceivedEventArgs : EventArgs { public ImfManager ImfManager @@ -663,13 +787,22 @@ namespace Tizen.NUI get; set; } + + public ImfEventData ImfEventData + { + get; + set; + } } - private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data); + private delegate ImfCallbackData ImfManagerEventReceivedEventCallbackType(global::System.IntPtr imfManager, global::System.IntPtr imfEventData); private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback; - private event EventHandler _imfManagerEventReceivedEventHandler; - public event EventHandler ImfManagerEventReceived + private event EventHandlerWithReturnType _imfManagerEventReceivedEventHandler; + /// + /// ImfManager event received. + /// + public event EventHandlerWithReturnType ImfManagerEventReceived { add { @@ -692,40 +825,46 @@ namespace Tizen.NUI } } - private void OnImfManagerEventReceived(global::System.IntPtr data) + private ImfCallbackData OnImfManagerEventReceived(global::System.IntPtr imfManager, global::System.IntPtr imfEventData) { ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs(); - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); + e.ImfManager = ImfManager.GetImfManagerFromPtr(imfManager); + e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData); if (_imfManagerEventReceivedEventHandler != null) { - _imfManagerEventReceivedEventHandler(this, e); + return _imfManagerEventReceivedEventHandler(this, e); } + return null; } - public ImfEventSignalType EventReceivedSignal() + internal ImfEventSignalType EventReceivedSignal() { ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - // StatusChangedSignal + /// + /// ImfManager status changed event arguments. + /// public class ImfManagerStatusChangedEventArgs : EventArgs { - public ImfManager ImfManager + public bool StatusChanged { get; set; } } - private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data); + private delegate void ImfManagerStatusChangedEventCallbackType(bool statusChanged); private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback; private event EventHandler _imfManagerStatusChangedEventHandler; - + /// + /// ImfManager status changed. + /// public event EventHandler ImfManagerStatusChanged { add @@ -749,11 +888,11 @@ namespace Tizen.NUI } } - private void OnImfManagerStatusChanged(global::System.IntPtr data) + private void OnImfManagerStatusChanged(bool statusChanged) { ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs(); - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); + e.StatusChanged = statusChanged; if (_imfManagerStatusChangedEventHandler != null) { @@ -761,29 +900,21 @@ namespace Tizen.NUI } } - public StatusSignalType StatusChangedSignal() + internal StatusSignalType StatusChangedSignal() { StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - // ResizedSignal - public class ImfManagerResizedEventArgs : EventArgs - { - public ImfManager ImfManager - { - get; - set; - } - } - - private delegate void ImfManagerResizedEventCallbackType(global::System.IntPtr data); + private delegate void ImfManagerResizedEventCallbackType(); private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback; - private event EventHandler _imfManagerResizedEventHandler; - - public event EventHandler ImfManagerResized + private event EventHandler _imfManagerResizedEventHandler; + /// + /// ImfManager resized. + /// + public event EventHandler ImfManagerResized { add { @@ -806,41 +937,29 @@ namespace Tizen.NUI } } - private void OnImfManagerResized(global::System.IntPtr data) + private void OnImfManagerResized() { - ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs(); - - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); - if (_imfManagerResizedEventHandler != null) { - _imfManagerResizedEventHandler(this, e); + _imfManagerResizedEventHandler(this, null); } } - public ImfVoidSignalType ResizedSignal() + internal ImfVoidSignalType ResizedSignal() { ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - // LanguageChangedSignal - public class ImfManagerLanguageChangedEventArgs : EventArgs - { - public ImfManager ImfManager - { - get; - set; - } - } - - private delegate void ImfManagerLanguageChangedEventCallbackType(global::System.IntPtr data); + private delegate void ImfManagerLanguageChangedEventCallbackType(); private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback; - private event EventHandler _imfManagerLanguageChangedEventHandler; - - public event EventHandler ImfManagerLanguageChanged + private event EventHandler _imfManagerLanguageChangedEventHandler; + /// + /// ImfManager language changed. + /// + public event EventHandler ImfManagerLanguageChanged { add { @@ -863,577 +982,164 @@ namespace Tizen.NUI } } - private void OnImfManagerLanguageChanged(global::System.IntPtr data) + private void OnImfManagerLanguageChanged() { - ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs(); - - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); - if (_imfManagerLanguageChangedEventHandler != null) { - _imfManagerLanguageChangedEventHandler(this, e); + _imfManagerLanguageChangedEventHandler(this, null); } } - public ImfVoidSignalType LanguageChangedSignal() + internal ImfVoidSignalType LanguageChangedSignal() { ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - - /////////////////////////////////////////////////////////////////////////////// - internal class SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager(global::System.IntPtr cPtr, bool futureUse) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - protected SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager() - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Internal__Adaptor__ImfManager obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - } - - internal class SWIGTYPE_p_InputMethodOptions - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal SWIGTYPE_p_InputMethodOptions(global::System.IntPtr cPtr, bool futureUse) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - protected SWIGTYPE_p_InputMethodOptions() - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_InputMethodOptions obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - } - - /////////////////////////////////////////////////////////////////////////////// - public class ActivatedSignalType : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ActivatedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) - { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ActivatedSignalType obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ActivatedSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ActivatedSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public bool Empty() - { - bool ret = NDalicManualPINVOKE.ActivatedSignalType_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() - { - uint ret = NDalicManualPINVOKE.ActivatedSignalType_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ActivatedSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Disconnect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ActivatedSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Emit(bool arg) - { - NDalicManualPINVOKE.ActivatedSignalType_Emit(swigCPtr, arg); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ActivatedSignalType() : this(NDalicManualPINVOKE.new_ActivatedSignalType(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - - /////////////////////////////////////////////////////////////////////////////// - public class ImfEventSignalType : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ImfEventSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) - { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventSignalType obj) + /// + /// ImfManager keyboard type changed event arguments. + /// + public class ImfKeyboardTypeChangedEventArgs : EventArgs { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ImfEventSignalType() - { - if (!isDisposeQueued) + public KeyboardType KeyboardType { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); + get; + set; } } - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } + private delegate void ImfKeyboardTypeChangedEventCallbackType(KeyboardType type); + private ImfKeyboardTypeChangedEventCallbackType _imfKeyboardTypeChangedEventCallback; - protected virtual void Dispose(DisposeTypes type) + private event EventHandler _imfKeyboardTypeChangedEventHandler; + /// + /// ImfManager keyboard type changed. + /// + public event EventHandler ImfKeyboardTypeChanged { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) + add { - if (swigCMemOwn) + if (_imfKeyboardTypeChangedEventHandler == null) { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfEventSignalType(swigCPtr); + _imfKeyboardTypeChangedEventCallback = OnImfKeyboardTypeChanged; + KeyboardTypeChangedSignal().Connect(_imfKeyboardTypeChangedEventCallback); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - disposed = true; - } - - public bool Empty() - { - bool ret = NDalicManualPINVOKE.ImfEventSignalType_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() - { - uint ret = NDalicManualPINVOKE.ImfEventSignalType_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ImfEventSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + _imfKeyboardTypeChangedEventHandler += value; } - } - - public void Disconnect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ImfEventSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Emit(bool arg1, bool arg2) - { - NDalicManualPINVOKE.ImfEventSignalType_Emit(swigCPtr, arg1, arg2); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ImfEventSignalType() : this(NDalicManualPINVOKE.new_ImfEventSignalType(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - - /////////////////////////////////////////////////////////////////////////////// - public class StatusSignalType : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal StatusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) - { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StatusSignalType obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~StatusSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) - { - if (disposed) + remove { - return; - } + _imfKeyboardTypeChangedEventHandler -= value; - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) + if (_imfKeyboardTypeChangedEventHandler == null && _imfKeyboardTypeChangedEventCallback != null) { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_StatusSignalType(swigCPtr); + KeyboardTypeChangedSignal().Disconnect(_imfKeyboardTypeChangedEventCallback); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - - disposed = true; - } - - public bool Empty() - { - bool ret = NDalicManualPINVOKE.StatusSignalType_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; } - public uint GetConnectionCount() + private void OnImfKeyboardTypeChanged(KeyboardType type) { - uint ret = NDalicManualPINVOKE.StatusSignalType_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + ImfKeyboardTypeChangedEventArgs e = new ImfKeyboardTypeChangedEventArgs(); - public void Connect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.StatusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + e.KeyboardType = type; - public void Disconnect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + if (_imfKeyboardTypeChangedEventHandler != null) { - NDalicManualPINVOKE.StatusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + _imfKeyboardTypeChangedEventHandler(this, e); } } - public void Emit(bool arg) - { - NDalicManualPINVOKE.StatusSignalType_Emit(swigCPtr, arg); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public StatusSignalType() : this(NDalicManualPINVOKE.new_StatusSignalType(), true) + internal KeyboardTypeSignalType KeyboardTypeChangedSignal() { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - - /////////////////////////////////////////////////////////////////////////////// - public class ImfVoidSignalType : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ImfVoidSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) - { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfVoidSignalType obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ImfVoidSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfVoidSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public bool Empty() - { - bool ret = NDalicManualPINVOKE.ImfVoidSignalType_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() - { - uint ret = NDalicManualPINVOKE.ImfVoidSignalType_GetConnectionCount(swigCPtr); + KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - public void Connect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ImfVoidSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Disconnect(System.Delegate func) + /// + /// The direction of text. + /// + public enum TextDirection { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ImfVoidSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + /// + /// Left to right. + /// + LeftToRight, + /// + /// Right to left. + /// + RightToLeft } - public void Emit() + /// + /// Events that are generated by the IMF. + /// + public enum ImfEvent { - NDalicManualPINVOKE.ImfVoidSignalType_Emit(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ImfVoidSignalType() : this(NDalicManualPINVOKE.new_ImfVoidSignalType(), true) + /// + /// No event. + /// + Void, + /// + /// Pre-Edit changed. + /// + Preedit, + /// + /// Commit recieved. + /// + Commit, + /// + /// Event to delete a range of characters from the string. + /// + DeleteSurrounding, + /// + /// Event to query string and cursor position. + /// + GetSurrounding, + /// + /// Private command sent from the input panel. + /// + PrivateCommand + } + + /// + /// Enumeration for state of the input panel. + /// + public enum State { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + /// + /// Unknown state. + /// + Default = 0, + /// + /// Input panel is shown. + /// + Show, + /// + /// Input panel is hidden. + /// + Hide, + /// + /// Input panel in process of being shown. + /// + WillShow + } + + /// + /// Enumeration for the type of Keyboard. + /// + public enum KeyboardType + { + /// + /// Software keyboard (Virtual keyboard) is default. + /// + SoftwareKeyboard, + /// + /// Hardware keyboard. + /// + HardwareKeyboard } - } - } -- 2.7.4