[NUI] Sync with dalihub (#693)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / ImfManager.cs
index 391e34f..621fa18 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2018 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.
@@ -25,473 +25,346 @@ namespace Tizen.NUI
     /// Specifically manages the input method framework which enables the virtual or hardware keyboards.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [Obsolete("Please do not use! This will be deprecated! Please use InputMethodContext instead!")]
+    [EditorBrowsable(EditorBrowsableState.Never)]
     public class ImfManager : BaseHandle
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
-        internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
+        private ActivatedEventCallbackType _activatedEventCallback;
+        private EventReceivedEventCallbackType _eventReceivedEventCallback;
+        private StatusChangedEventCallbackType _statusChangedEventCallback;
+        private ResizedEventCallbackType _resizedEventCallback;
+        private LanguageChangedEventCallbackType _languageChangedEventCallback;
+        private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
+
+        /// <summary>
+        /// Constructor.<br/>
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        public ImfManager() : this(NDalicManualPINVOKE.InputMethodContext_New(), true)
         {
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
         }
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
+        internal ImfManager(ImfManager imfManager) : this(NDalicManualPINVOKE.new_InputMethodContext__SWIG_1(ImfManager.getCPtr(imfManager)), true)
         {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        private static readonly ImfManager instance = ImfManager.Get();
+        internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.InputMethodContext_SWIGUpcast(cPtr), cMemoryOwn)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void ActivatedEventCallbackType(IntPtr data);
+        private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
+        private delegate void StatusChangedEventCallbackType(bool statusChanged);
+        private delegate void ResizedEventCallbackType(int resized);
+        private delegate void LanguageChangedEventCallbackType(int languageChanged);
+        private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
 
         /// <summary>
-        /// Gets the singleton of the ImfManager object.
+        /// ImfManager activated.
         /// </summary>
-        /// <since_tizen> 5 </since_tizen>
-        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static ImfManager Instance
+        /// <since_tizen> 4 </since_tizen>
+        public event EventHandler<ActivatedEventArgs> Activated
         {
-            get
+            add
+            {
+                if (_activatedEventHandler == null)
+                {
+                    _activatedEventCallback = OnActivated;
+                    ActivatedSignal().Connect(_activatedEventCallback);
+                }
+
+                _activatedEventHandler += value;
+            }
+            remove
             {
-                return instance;
+                _activatedEventHandler -= value;
+
+                if (_activatedEventHandler == null && _activatedEventCallback != null)
+                {
+                    ActivatedSignal().Disconnect(_activatedEventCallback);
+                }
             }
         }
 
         /// <summary>
-        /// This structure is used to pass on data from the IMF regarding predictive text.
+        /// ImfManager event received.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public class ImfEventData : global::System.IDisposable
+        /// <since_tizen> 4 </since_tizen>
+        public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
         {
-            private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-            /// <summary>
-            /// swigCMemOwn
-            /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            protected bool swigCMemOwn;
-
-            internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
+            add
             {
-                swigCMemOwn = cMemoryOwn;
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            }
+                if (_eventReceivedEventHandler == null)
+                {
+                    _eventReceivedEventCallback = OnEventReceived;
+                    EventReceivedSignal().Connect(_eventReceivedEventCallback);
+                }
 
-            internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
-            {
-                return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+                _eventReceivedEventHandler += value;
             }
-
-            //A Flag to check who called Dispose(). (By User or DisposeQueue)
-            private bool isDisposeQueued = false;
-            /// <summary>
-            /// A Flat to check if it is already disposed.
-            /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            protected bool disposed = false;
-
-            /// <summary>
-            /// Dispose.
-            /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            ~ImfEventData()
+            remove
             {
-                if (!isDisposeQueued)
+                _eventReceivedEventHandler -= value;
+
+                if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
                 {
-                    isDisposeQueued = true;
-                    DisposeQueue.Instance.Add(this);
+                    EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
                 }
             }
+        }
 
-            /// <summary>
-            /// The dispose pattern.
-            /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            public void Dispose()
+        /// <summary>
+        /// ImfManager status changed.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        public event EventHandler<StatusChangedEventArgs> StatusChanged
+        {
+            add
             {
-                //Throw excpetion if Dispose() is called in separate thread.
-                if (!Window.IsInstalled())
+                if (_statusChangedEventHandler == null)
                 {
-                    throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+                    _statusChangedEventCallback = OnStatusChanged;
+                    StatusChangedSignal().Connect(_statusChangedEventCallback);
                 }
 
-                if (isDisposeQueued)
-                {
-                    Dispose(DisposeTypes.Implicit);
-                }
-                else
-                {
-                    Dispose(DisposeTypes.Explicit);
-                    System.GC.SuppressFinalize(this);
-                }
+                _statusChangedEventHandler += value;
             }
-
-            /// <summary>
-            /// Dispose.
-            /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            protected virtual void Dispose(DisposeTypes type)
+            remove
             {
-                if (disposed)
+                _statusChangedEventHandler -= value;
+
+                if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
                 {
-                    return;
+                    StatusChangedSignal().Disconnect(_statusChangedEventCallback);
                 }
+            }
+        }
 
-                if (type == DisposeTypes.Explicit)
+        /// <summary>
+        /// ImfManager resized.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        public event EventHandler<ResizedEventArgs> Resized
+        {
+            add
+            {
+                if (_resizedEventHandler == null)
                 {
-                    //Called by User
-                    //Release your own managed resources here.
-                    //You should release all of your own disposable objects here.
-
+                    _resizedEventCallback = OnResized;
+                    ResizedSignal().Connect(_resizedEventCallback);
                 }
 
-                //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.
+                _resizedEventHandler += value;
+            }
+            remove
+            {
+                _resizedEventHandler -= value;
 
-                if (swigCPtr.Handle != IntPtr.Zero)
+                if (_resizedEventHandler == null && _resizedEventCallback != null)
                 {
-                    if (swigCMemOwn)
-                    {
-                        swigCMemOwn = false;
-                        NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
-                    }
-                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
+                    ResizedSignal().Disconnect(_resizedEventCallback);
                 }
-
-                disposed = true;
             }
+        }
 
-            internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
+        /// <summary>
+        /// ImfManager language changed.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        public event EventHandler<LanguageChangedEventArgs> LanguageChanged
+        {
+            add
             {
-                ImfEventData ret = new ImfEventData(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
+                if (_languageChangedEventHandler == null)
+                {
+                    _languageChangedEventCallback = OnLanguageChanged;
+                    LanguageChangedSignal().Connect(_languageChangedEventCallback);
+                }
 
-            /// <summary>
-            /// The default constructor.
-            /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            public ImfEventData() : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_0(), true)
-            {
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                _languageChangedEventHandler += value;
             }
-
-            /// <summary>
-            /// The constructor.
-            /// </summary>
-            /// <param name="aEventName">The name of the event from the IMF.</param>
-            /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
-            /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
-            /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
-            /// <since_tizen> 3 </since_tizen>
-            public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_ImfManager_ImfEventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
+            remove
             {
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                _languageChangedEventHandler -= value;
+
+                if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
+                {
+                    LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
+                }
             }
+        }
 
-            /// <summary>
-            /// The pre-edit or the commit string.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public string PredictiveString
+        /// <summary>
+        /// ImfManager keyboard type changed.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
+        {
+            add
             {
-                set
+                if (_keyboardTypeChangedEventHandler == null)
                 {
-                    NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
+                    KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
                 }
-                get
+
+                _keyboardTypeChangedEventHandler += value;
+            }
+            remove
+            {
+                _keyboardTypeChangedEventHandler -= value;
+
+                if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
                 {
-                    string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
+                    KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
                 }
             }
+        }
 
-            /// <summary>
-            /// The name of the event from the IMF.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public ImfManager.ImfEvent EventName
-            {
-                set
-                {
-                    NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                }
-                get
-                {
-                    ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
-                }
-            }
+        private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
+        private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
+        private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
+        private event EventHandler<ResizedEventArgs> _resizedEventHandler;
+        private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
+        private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
 
+        /// <summary>
+        /// The direction of the text.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public enum TextDirection
+        {
             /// <summary>
-            /// The start position from the current cursor position to start deleting characters.
+            /// Left to right.
             /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public int CursorOffset
-            {
-                set
-                {
-                    NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                }
-                get
-                {
-                    int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
-                }
-            }
-
+            LeftToRight,
             /// <summary>
-            /// The number of characters to delete from the cursorOffset.
+            /// Right to left.
             /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public int NumberOfChars
-            {
-                set
-                {
-                    NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                }
-                get
-                {
-                    int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
-                }
-            }
-
+            RightToLeft
         }
 
         /// <summary>
-        /// Data required by the IMF from the callback.
+        /// Events that are generated by the IMF.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        public class ImfCallbackData : global::System.IDisposable
+        public enum ImfEvent
         {
-            private global::System.Runtime.InteropServices.HandleRef swigCPtr;
             /// <summary>
-            /// swigCMemOwn
+            /// No event.
             /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            protected bool swigCMemOwn;
-
-            internal IntPtr GetImfCallbackDataPtr()
-            {
-                return (IntPtr)swigCPtr;
-            }
-
-            internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
-            {
-                swigCMemOwn = cMemoryOwn;
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-            }
-
-            internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
-            {
-                return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
-            }
-
-            //A Flag to check who called Dispose(). (By User or DisposeQueue)
-            private bool isDisposeQueued = false;
+            /// <since_tizen> 4 </since_tizen>
+            Void,
             /// <summary>
-            /// A Flat to check if it is already disposed.
+            /// Pre-Edit changed.
             /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            protected bool disposed = false;
-
-
+            /// <since_tizen> 4 </since_tizen>
+            Preedit,
             /// <summary>
-            /// Dispose.
+            /// Commit received.
             /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            ~ImfCallbackData()
-            {
-                if (!isDisposeQueued)
-                {
-                    isDisposeQueued = true;
-                    DisposeQueue.Instance.Add(this);
-                }
-            }
-
+            /// <since_tizen> 4 </since_tizen>
+            Commit,
             /// <summary>
-            /// The dispose pattern.
+            /// An event to delete a range of characters from the string.
             /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            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);
-                }
-            }
-
+            /// <since_tizen> 4 </since_tizen>
+            DeleteSurrounding,
             /// <summary>
-            /// Dispose.
+            /// An event to query string and the cursor position.
             /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            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 != IntPtr.Zero)
-                {
-                    if (swigCMemOwn)
-                    {
-                        swigCMemOwn = false;
-                        NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
-                    }
-                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
-                }
-
-                disposed = true;
-            }
-
-            internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
-            {
-                ImfCallbackData ret = new ImfCallbackData(cPtr, false);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
-            }
-
+            /// <since_tizen> 4 </since_tizen>
+            GetSurrounding,
             /// <summary>
-            /// The default constructor.
+            /// Private command sent from the input panel.
             /// </summary>
-            /// <since_tizen> 3 </since_tizen>
-            public ImfCallbackData() : this(NDalicManualPINVOKE.new_ImfManager_ImfCallbackData__SWIG_0(), true)
-            {
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
+            /// <since_tizen> 4 </since_tizen>
+            PrivateCommand
+        }
 
+        /// <summary>
+        /// Enumeration for the state of the input panel.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public enum State
+        {
             /// <summary>
-            /// The constructor.
+            /// Unknown state.
             /// </summary>
-            /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
-            /// <param name="aCursorPosition">The new position of the cursor.</param>
-            /// <param name="aCurrentText">The current text string.</param>
-            /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
-            /// <since_tizen> 3 </since_tizen>
-            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();
-            }
-
+            /// <since_tizen> 4 </since_tizen>
+            Default = 0,
             /// <summary>
-            /// The current text string.
+            /// Input panel is shown.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public string CurrentText
-            {
-                set
-                {
-                    NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                }
-                get
-                {
-                    string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
-                }
-            }
-
+            Show,
             /// <summary>
-            /// The current text string.
+            /// Input panel is hidden.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public int CursorPosition
-            {
-                set
-                {
-                    NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                }
-                get
-                {
-                    int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
-                }
-            }
-
+            Hide,
             /// <summary>
-            /// If the cursor position needs to be updated.
+            /// Input panel in process of being shown.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public bool Update
-            {
-                set
-                {
-                    NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                }
-                get
-                {
-                    bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
-                }
-            }
+            WillShow
+        }
 
+        /// <summary>
+        /// Enumeration for the types of keyboard.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        public enum KeyboardType
+        {
             /// <summary>
-            /// Flags if preedit reset is required.
+            /// Software keyboard (virtual keyboard) is default.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public bool PreeditResetRequired
+            SoftwareKeyboard,
+            /// <summary>
+            /// Hardware keyboard.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            HardwareKeyboard
+        }
+
+        /// <summary>
+        /// Gets the singleton of the ImfManager object.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        public static ImfManager Instance
+        {
+            get
             {
-                set
-                {
-                    NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                }
-                get
-                {
-                    bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr);
-                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    return ret;
-                }
+                return new ImfManager();
             }
+        }
 
+        /// <summary>
+        /// Retrieves a handle to the instance of the ImfManager.
+        /// </summary>
+        /// <returns>A handle to the ImfManager.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public static ImfManager Get()
+        {
+            return new ImfManager();
         }
 
         /// <summary>
-        /// Destroy the context of the IMF.<br/>
+        /// Destroys the context of the IMF.<br/>
         /// </summary>
         /// <since_tizen> 5 </since_tizen>
-        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
         public void DestroyContext()
         {
-            NDalicManualPINVOKE.ImfManager_Finalize(swigCPtr);
+            NDalicManualPINVOKE.InputMethodContext_Finalize(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -500,24 +373,14 @@ namespace Tizen.NUI
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
+#pragma warning disable 0465
         [Obsolete("Please do not use! This will be deprecated! Please use ImfManager.Instance.DestroyContext() instead!")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void Finalize()
         {
             DestroyContext();
         }
-
-        /// <summary>
-        /// Retrieves a handle to the instance of the ImfManager.
-        /// </summary>
-        /// <returns>A handle to the ImfManager.</returns>
-        /// <since_tizen> 3 </since_tizen>
-        public static ImfManager Get()
-        {
-            ImfManager ret = new ImfManager(NDalicManualPINVOKE.ImfManager_Get(), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
+#pragma warning restore 0465
 
         /// <summary>
         /// Activates the IMF.<br/>
@@ -527,7 +390,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void Activate()
         {
-            NDalicManualPINVOKE.ImfManager_Activate(swigCPtr);
+            NDalicManualPINVOKE.InputMethodContext_Activate(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -538,7 +401,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void Deactivate()
         {
-            NDalicManualPINVOKE.ImfManager_Deactivate(swigCPtr);
+            NDalicManualPINVOKE.InputMethodContext_Deactivate(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -550,7 +413,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public bool RestoreAfterFocusLost()
         {
-            bool ret = NDalicManualPINVOKE.ImfManager_RestoreAfterFocusLost(swigCPtr);
+            bool ret = NDalicManualPINVOKE.InputMethodContext_RestoreAfterFocusLost(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -562,7 +425,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void SetRestoreAfterFocusLost(bool toggle)
         {
-            NDalicManualPINVOKE.ImfManager_SetRestoreAfterFocusLost(swigCPtr, toggle);
+            NDalicManualPINVOKE.InputMethodContext_SetRestoreAfterFocusLost(swigCPtr, toggle);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -572,7 +435,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public new void Reset()
         {
-            NDalicManualPINVOKE.ImfManager_Reset(swigCPtr);
+            NDalicManualPINVOKE.InputMethodContext_Reset(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -582,7 +445,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void NotifyCursorPosition()
         {
-            NDalicManualPINVOKE.ImfManager_NotifyCursorPosition(swigCPtr);
+            NDalicManualPINVOKE.InputMethodContext_NotifyCursorPosition(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -593,7 +456,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void SetCursorPosition(uint cursorPosition)
         {
-            NDalicManualPINVOKE.ImfManager_SetCursorPosition(swigCPtr, cursorPosition);
+            NDalicManualPINVOKE.InputMethodContext_SetCursorPosition(swigCPtr, cursorPosition);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -604,7 +467,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public uint GetCursorPosition()
         {
-            uint ret = NDalicManualPINVOKE.ImfManager_GetCursorPosition(swigCPtr);
+            uint ret = NDalicManualPINVOKE.InputMethodContext_GetCursorPosition(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -616,7 +479,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void SetSurroundingText(string text)
         {
-            NDalicManualPINVOKE.ImfManager_SetSurroundingText(swigCPtr, text);
+            NDalicManualPINVOKE.InputMethodContext_SetSurroundingText(swigCPtr, text);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -627,7 +490,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public string GetSurroundingText()
         {
-            string ret = NDalicManualPINVOKE.ImfManager_GetSurroundingText(swigCPtr);
+            string ret = NDalicManualPINVOKE.InputMethodContext_GetSurroundingText(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -639,7 +502,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void NotifyTextInputMultiLine(bool multiLine)
         {
-            NDalicManualPINVOKE.ImfManager_NotifyTextInputMultiLine(swigCPtr, multiLine);
+            NDalicManualPINVOKE.InputMethodContext_NotifyTextInputMultiLine(swigCPtr, multiLine);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -650,7 +513,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public ImfManager.TextDirection GetTextDirection()
         {
-            ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.ImfManager_GetTextDirection(swigCPtr);
+            ImfManager.TextDirection ret = (ImfManager.TextDirection)NDalicManualPINVOKE.InputMethodContext_GetTextDirection(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -666,17 +529,11 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public Rectangle GetInputMethodArea()
         {
-            Rectangle ret = new Rectangle(NDalicManualPINVOKE.ImfManager_GetInputMethodArea(swigCPtr), true);
+            Rectangle ret = new Rectangle(NDalicManualPINVOKE.InputMethodContext_GetInputMethodArea(swigCPtr), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        internal void ApplyOptions(InputMethodOptions options)
-        {
-            NDalicManualPINVOKE.ImfManager_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
         /// <summary>
         /// Sets up the input-panel specific data.
         /// </summary>
@@ -684,7 +541,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void SetInputPanelUserData(string text)
         {
-            NDalicManualPINVOKE.ImfManager_SetInputPanelUserData(swigCPtr, text);
+            NDalicManualPINVOKE.InputMethodContext_SetInputPanelUserData(swigCPtr, text);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -695,7 +552,7 @@ namespace Tizen.NUI
         /// <since_tizen> 4 </since_tizen>
         public void GetInputPanelUserData(out string text)
         {
-            NDalicManualPINVOKE.ImfManager_GetInputPanelUserData(swigCPtr, out text);
+            NDalicManualPINVOKE.InputMethodContext_GetInputPanelUserData(swigCPtr, out text);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -706,7 +563,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public ImfManager.State GetInputPanelState()
         {
-            ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.ImfManager_GetInputPanelState(swigCPtr);
+            ImfManager.State ret = (ImfManager.State)NDalicManualPINVOKE.InputMethodContext_GetInputPanelState(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -719,7 +576,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void SetReturnKeyState(bool visible)
         {
-            NDalicManualPINVOKE.ImfManager_SetReturnKeyState(swigCPtr, visible);
+            NDalicManualPINVOKE.InputMethodContext_SetReturnKeyState(swigCPtr, visible);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -730,7 +587,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void AutoEnableInputPanel(bool enabled)
         {
-            NDalicManualPINVOKE.ImfManager_AutoEnableInputPanel(swigCPtr, enabled);
+            NDalicManualPINVOKE.InputMethodContext_AutoEnableInputPanel(swigCPtr, enabled);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -740,584 +597,787 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void ShowInputPanel()
         {
-            NDalicManualPINVOKE.ImfManager_ShowInputPanel(swigCPtr);
+            NDalicManualPINVOKE.InputMethodContext_ShowInputPanel(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Hides the input panel.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public void HideInputPanel()
+        {
+            NDalicManualPINVOKE.InputMethodContext_HideInputPanel(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Gets the keyboard type.<br/>
+        /// The default keyboard type is SoftwareKeyboard.
+        /// </summary>
+        /// <returns>The keyboard type.</returns>
+        /// <since_tizen> 4 </since_tizen>
+        public ImfManager.KeyboardType GetKeyboardType()
+        {
+            ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.InputMethodContext_GetKeyboardType(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the current language locale of the input panel.<br/>
+        /// For example, en_US, en_GB, en_PH, fr_FR, ...
+        /// </summary>
+        /// <returns>The current language locale of the input panel.</returns>
+        /// <since_tizen> 4 </since_tizen>
+        public string GetInputPanelLocale()
+        {
+            string ret = NDalicManualPINVOKE.InputMethodContext_GetInputPanelLocale(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal ImfManager Assign(ImfManager imfManager)
+        {
+            ImfManager ret = new ImfManager(NDalicManualPINVOKE.InputMethodContext_Assign(swigCPtr, ImfManager.getCPtr(imfManager)), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal static ImfManager DownCast(BaseHandle handle)
+        {
+            ImfManager ret = new ImfManager(NDalicManualPINVOKE.InputMethodContext_DownCast(BaseHandle.getCPtr(handle)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal void ApplyOptions(InputMethodOptions options)
+        {
+            NDalicManualPINVOKE.InputMethodContext_ApplyOptions(swigCPtr, InputMethodOptions.getCPtr(options));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        internal ActivatedSignalType ActivatedSignal()
+        {
+            ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.InputMethodContext_ActivatedSignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal KeyboardEventSignalType EventReceivedSignal()
+        {
+            KeyboardEventSignalType ret = new KeyboardEventSignalType(NDalicManualPINVOKE.InputMethodContext_EventReceivedSignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal StatusSignalType StatusChangedSignal()
+        {
+            StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.InputMethodContext_StatusChangedSignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal KeyboardResizedSignalType ResizedSignal()
+        {
+            KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.InputMethodContext_ResizedSignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal LanguageChangedSignalType LanguageChangedSignal()
+        {
+            LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.InputMethodContext_LanguageChangedSignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
+        {
+            KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.InputMethodContext_KeyboardTypeChangedSignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <param name="type">Dispose Type</param>
+        /// <since_tizen> 3 </since_tizen>
+        /// Please DO NOT use! This will be deprecated!
+        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, ImfManager, TtsPlayer, Window) is not required.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        protected override 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 (_keyboardTypeChangedEventCallback != null)
+            {
+                KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
+            }
+
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                if (swigCMemOwn)
+                {
+                    swigCMemOwn = false;
+                    NDalicManualPINVOKE.delete_InputMethodContext(swigCPtr);
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
+            }
+
+            base.Dispose(type);
+        }
+
+        private void OnActivated(IntPtr data)
+        {
+            ActivatedEventArgs e = new ActivatedEventArgs();
+
+            if (data != null)
+            {
+                e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
+            }
+
+            if (_activatedEventHandler != null)
+            {
+                _activatedEventHandler(this, e);
+            }
+        }
+
+        private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
+        {
+            ImfCallbackData imfCallbackData = null;
+
+            EventReceivedEventArgs e = new EventReceivedEventArgs();
+
+            if (imfManager != null)
+            {
+                e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
+            }
+            if (imfEventData != null)
+            {
+                e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
+            }
+
+            if (_eventReceivedEventHandler != null)
+            {
+                imfCallbackData = _eventReceivedEventHandler(this, e);
+            }
+            if (imfCallbackData != null)
+            {
+                return imfCallbackData.GetImfCallbackDataPtr();
+            }
+            else
+            {
+                return new ImfCallbackData().GetImfCallbackDataPtr();
+            }
+        }
+
+        private void OnStatusChanged(bool statusChanged)
+        {
+            StatusChangedEventArgs e = new StatusChangedEventArgs();
+
+            e.StatusChanged = statusChanged;
+
+            if (_statusChangedEventHandler != null)
+            {
+                _statusChangedEventHandler(this, e);
+            }
         }
 
-        /// <summary>
-        /// Hides the input panel.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public void HideInputPanel()
+        private void OnResized(int resized)
         {
-            NDalicManualPINVOKE.ImfManager_HideInputPanel(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            ResizedEventArgs e = new ResizedEventArgs();
+            e.Resized = resized;
+
+            if (_resizedEventHandler != null)
+            {
+                _resizedEventHandler(this, e);
+            }
         }
 
-        /// <summary>
-        /// Gets the keyboard type.<br/>
-        /// The default keyboard type is SoftwareKeyboard.
-        /// </summary>
-        /// <returns>The keyboard type.</returns>
-        /// <since_tizen> 4 </since_tizen>
-        public ImfManager.KeyboardType GetKeyboardType()
+        private void OnLanguageChanged(int languageChanged)
         {
-            ImfManager.KeyboardType ret = (ImfManager.KeyboardType)NDalicManualPINVOKE.ImfManager_GetKeyboardType(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            LanguageChangedEventArgs e = new LanguageChangedEventArgs();
+            e.LanguageChanged = languageChanged;
+
+            if (_languageChangedEventHandler != null)
+            {
+                _languageChangedEventHandler(this, e);
+            }
         }
 
-        /// <summary>
-        /// Gets the current language locale of the input panel.<br/>
-        /// For example, en_US, en_GB, en_PH, fr_FR, ...
-        /// </summary>
-        /// <returns>The current language locale of the input panel.</returns>
-        /// <since_tizen> 4 </since_tizen>
-        public string GetInputPanelLocale()
+        private void OnKeyboardTypeChanged(KeyboardType type)
         {
-            string ret = NDalicManualPINVOKE.ImfManager_GetInputPanelLocale(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
+
+            e.KeyboardType = type;
+
+            if (_keyboardTypeChangedEventHandler != null)
+            {
+                _keyboardTypeChangedEventHandler(this, e);
+            }
         }
 
         /// <summary>
-        /// The constructor.
+        /// This structure is used to pass on data from the IMF regarding predictive text.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        public ImfManager() : this(NDalicManualPINVOKE.new_ImfManager(), true)
+        public class ImfEventData : global::System.IDisposable
         {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
+            /// <summary>
+            /// swigCMemOwn
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            protected bool swigCMemOwn;
 
-        /// <summary>
-        /// ImfManager activated event arguments.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public class ActivatedEventArgs : EventArgs
-        {
             /// <summary>
-            /// ImfManager
+            /// A Flat to check if it is already disposed.
             /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public ImfManager ImfManager
+            /// <since_tizen> 3 </since_tizen>
+            protected bool disposed = false;
+
+            private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+            //A Flag to check who called Dispose(). (By User or DisposeQueue)
+            private bool isDisposeQueued = false;
+
+            /// <summary>
+            /// The default constructor.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            public ImfEventData() : this(NDalicManualPINVOKE.new_InputMethodContext_EventData__SWIG_0(), true)
             {
-                get;
-                set;
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
-        }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void ActivatedEventCallbackType(IntPtr data);
-        private ActivatedEventCallbackType _activatedEventCallback;
-        private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
+            /// <summary>
+            /// The constructor.
+            /// </summary>
+            /// <param name="aEventName">The name of the event from the IMF.</param>
+            /// <param name="aPredictiveString">The pre-edit or the commit string.</param>
+            /// <param name="aCursorOffset">Start the position from the current cursor position to start deleting characters.</param>
+            /// <param name="aNumberOfChars">The number of characters to delete from the cursorOffset.</param>
+            /// <since_tizen> 3 </since_tizen>
+            public ImfEventData(ImfManager.ImfEvent aEventName, string aPredictiveString, int aCursorOffset, int aNumberOfChars) : this(NDalicManualPINVOKE.new_InputMethodContext_EventData__SWIG_1((int)aEventName, aPredictiveString, aCursorOffset, aNumberOfChars), true)
+            {
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
 
-        /// <summary>
-        /// ImfManager activated.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<ActivatedEventArgs> Activated
-        {
-            add
+            internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
             {
-                if (_activatedEventHandler == null)
+                swigCMemOwn = cMemoryOwn;
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            }
+
+            /// <summary>
+            /// Dispose.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            ~ImfEventData()
+            {
+                if (!isDisposeQueued)
                 {
-                    _activatedEventCallback = OnActivated;
-                    ActivatedSignal().Connect(_activatedEventCallback);
+                    isDisposeQueued = true;
+                    DisposeQueue.Instance.Add(this);
                 }
-
-                _activatedEventHandler += value;
             }
-            remove
-            {
-                _activatedEventHandler -= value;
 
-                if (_activatedEventHandler == null && _activatedEventCallback != null)
+            /// <summary>
+            /// The pre-edit or the commit string.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public string PredictiveString
+            {
+                set
                 {
-                    ActivatedSignal().Disconnect(_activatedEventCallback);
+                    NDalicManualPINVOKE.InputMethodContext_EventData_predictiveString_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    string ret = NDalicManualPINVOKE.InputMethodContext_EventData_predictiveString_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
                 }
             }
-        }
-
-        private void OnActivated(IntPtr data)
-        {
-            ActivatedEventArgs e = new ActivatedEventArgs();
 
-            if (data != null)
+            /// <summary>
+            /// The name of the event from the IMF.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public ImfManager.ImfEvent EventName
             {
-                e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager;
+                set
+                {
+                    NDalicManualPINVOKE.InputMethodContext_EventData_eventName_set(swigCPtr, (int)value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.InputMethodContext_EventData_eventName_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
+                }
             }
 
-            if (_activatedEventHandler != null)
+            /// <summary>
+            /// The start position from the current cursor position to start deleting characters.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public int CursorOffset
             {
-                _activatedEventHandler(this, e);
+                set
+                {
+                    NDalicManualPINVOKE.InputMethodContext_EventData_cursorOffset_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    int ret = NDalicManualPINVOKE.InputMethodContext_EventData_cursorOffset_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
+                }
             }
-        }
-
-        internal ActivatedSignalType ActivatedSignal()
-        {
-            ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
-        /// <summary>
-        /// ImfManager event received event arguments.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public class EventReceivedEventArgs : EventArgs
-        {
             /// <summary>
-            /// ImfManager
+            /// The number of characters to delete from the cursorOffset.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public ImfManager ImfManager
+            public int NumberOfChars
             {
-                get;
-                set;
+                set
+                {
+                    NDalicManualPINVOKE.InputMethodContext_EventData_numberOfChars_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    int ret = NDalicManualPINVOKE.InputMethodContext_EventData_numberOfChars_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
+                }
             }
 
             /// <summary>
-            /// ImfEventData
+            /// The dispose pattern.
             /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public ImfEventData ImfEventData
+            /// <since_tizen> 3 </since_tizen>
+            public void Dispose()
             {
-                get;
-                set;
+                //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 IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
-        private EventReceivedEventCallbackType _eventReceivedEventCallback;
-        private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
+            internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
+            {
+                ImfEventData ret = new ImfEventData(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
 
-        /// <summary>
-        /// ImfManager event received.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
-        {
-            add
+            internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
+            {
+                return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+            }
+
+            /// <summary>
+            /// Dispose.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            protected virtual void Dispose(DisposeTypes type)
             {
-                if (_eventReceivedEventHandler == null)
+                if (disposed)
                 {
-                    _eventReceivedEventCallback = OnEventReceived;
-                    EventReceivedSignal().Connect(_eventReceivedEventCallback);
+                    return;
                 }
 
-                _eventReceivedEventHandler += value;
-            }
-            remove
-            {
-                _eventReceivedEventHandler -= value;
+                if (type == DisposeTypes.Explicit)
+                {
+                    //Called by User
+                    //Release your own managed resources here.
+                    //You should release all of your own disposable objects here.
 
-                if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
+                }
+
+                //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 != IntPtr.Zero)
                 {
-                    EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
+                    if (swigCMemOwn)
+                    {
+                        swigCMemOwn = false;
+                        NDalicManualPINVOKE.delete_InputMethodContext_EventData(swigCPtr);
+                    }
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
                 }
+
+                disposed = true;
             }
         }
 
-        private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
+        /// <summary>
+        /// Data required by the IMF from the callback.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public class ImfCallbackData : global::System.IDisposable
         {
-            ImfCallbackData imfCallbackData = null;
+            /// <summary>
+            /// swigCMemOwn
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            protected bool swigCMemOwn;
 
-            EventReceivedEventArgs e = new EventReceivedEventArgs();
+            /// <summary>
+            /// A Flat to check if it is already disposed.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            protected bool disposed = false;
 
-            if (imfManager != null)
-            {
-                e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(imfManager) as ImfManager;
-            }
-            if (imfEventData != null)
+            private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+            //A Flag to check who called Dispose(). (By User or DisposeQueue)
+            private bool isDisposeQueued = false;
+
+            /// <summary>
+            /// The default constructor.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            public ImfCallbackData() : this(NDalicManualPINVOKE.new_InputMethodContext_CallbackData__SWIG_0(), true)
             {
-                e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
 
-            if (_eventReceivedEventHandler != null)
+            /// <summary>
+            /// The constructor.
+            /// </summary>
+            /// <param name="aUpdate">True if the cursor position needs to be updated.</param>
+            /// <param name="aCursorPosition">The new position of the cursor.</param>
+            /// <param name="aCurrentText">The current text string.</param>
+            /// <param name="aPreeditResetRequired">Flag if preedit reset is required.</param>
+            /// <since_tizen> 3 </since_tizen>
+            public ImfCallbackData(bool aUpdate, int aCursorPosition, string aCurrentText, bool aPreeditResetRequired) : this(NDalicManualPINVOKE.new_InputMethodContext_CallbackData__SWIG_1(aUpdate, aCursorPosition, aCurrentText, aPreeditResetRequired), true)
             {
-                imfCallbackData = _eventReceivedEventHandler(this, e);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
-            if (imfCallbackData != null)
+
+            internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
             {
-                return imfCallbackData.GetImfCallbackDataPtr();
+                swigCMemOwn = cMemoryOwn;
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
             }
-            else
+
+            /// <summary>
+            /// Dispose.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            ~ImfCallbackData()
             {
-                return new ImfCallbackData().GetImfCallbackDataPtr();
+                if (!isDisposeQueued)
+                {
+                    isDisposeQueued = true;
+                    DisposeQueue.Instance.Add(this);
+                }
             }
-        }
-
-        internal ImfEventSignalType EventReceivedSignal()
-        {
-            ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
-        /// <summary>
-        /// ImfManager status changed event arguments.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public class StatusChangedEventArgs : EventArgs
-        {
             /// <summary>
-            /// ImfManager status
+            /// The current text string.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public bool StatusChanged
+            public string CurrentText
             {
-                get;
-                set;
+                set
+                {
+                    NDalicManualPINVOKE.InputMethodContext_CallbackData_currentText_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    string ret = NDalicManualPINVOKE.InputMethodContext_CallbackData_currentText_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
+                }
             }
-        }
-
-        private delegate void StatusChangedEventCallbackType(bool statusChanged);
-        private StatusChangedEventCallbackType _statusChangedEventCallback;
-        private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
 
-        /// <summary>
-        /// ImfManager status changed.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<StatusChangedEventArgs> StatusChanged
-        {
-            add
+            /// <summary>
+            /// The current text string.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public int CursorPosition
             {
-                if (_statusChangedEventHandler == null)
+                set
                 {
-                    _statusChangedEventCallback = OnStatusChanged;
-                    StatusChangedSignal().Connect(_statusChangedEventCallback);
+                    NDalicManualPINVOKE.InputMethodContext_CallbackData_cursorPosition_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 }
-
-                _statusChangedEventHandler += value;
-            }
-            remove
-            {
-                _statusChangedEventHandler -= value;
-
-                if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
+                get
                 {
-                    StatusChangedSignal().Disconnect(_statusChangedEventCallback);
+                    int ret = NDalicManualPINVOKE.InputMethodContext_CallbackData_cursorPosition_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
                 }
             }
-        }
 
-        private void OnStatusChanged(bool statusChanged)
-        {
-            StatusChangedEventArgs e = new StatusChangedEventArgs();
-
-            e.StatusChanged = statusChanged;
-
-            if (_statusChangedEventHandler != null)
+            /// <summary>
+            /// If the cursor position needs to be updated.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public bool Update
             {
-                _statusChangedEventHandler(this, e);
+                set
+                {
+                    NDalicManualPINVOKE.InputMethodContext_CallbackData_update_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    bool ret = NDalicManualPINVOKE.InputMethodContext_CallbackData_update_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
+                }
             }
-        }
-
-        internal StatusSignalType StatusChangedSignal()
-        {
-            StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
-        /// <summary>
-        /// ImfManager resized event.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public class ResizedEventArgs : EventArgs
-        {
             /// <summary>
-            /// resized.
+            /// Flags if preedit reset is required.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public int Resized
+            public bool PreeditResetRequired
             {
-                get;
-                set;
+                set
+                {
+                    NDalicManualPINVOKE.InputMethodContext_CallbackData_preeditResetRequired_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    bool ret = NDalicManualPINVOKE.InputMethodContext_CallbackData_preeditResetRequired_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
+                }
             }
-        }
-
-        private delegate void ResizedEventCallbackType(int resized);
-        private ResizedEventCallbackType _resizedEventCallback;
-        private event EventHandler<ResizedEventArgs> _resizedEventHandler;
 
-        /// <summary>
-        /// ImfManager resized.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<ResizedEventArgs> Resized
-        {
-            add
+            /// <summary>
+            /// The dispose pattern.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
+            public void Dispose()
             {
-                if (_resizedEventHandler == null)
+                //Throw excpetion if Dispose() is called in separate thread.
+                if (!Window.IsInstalled())
                 {
-                    _resizedEventCallback = OnResized;
-                    ResizedSignal().Connect(_resizedEventCallback);
+                    throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
                 }
 
-                _resizedEventHandler += value;
-            }
-            remove
-            {
-                _resizedEventHandler -= value;
-
-                if (_resizedEventHandler == null && _resizedEventCallback != null)
+                if (isDisposeQueued)
                 {
-                    ResizedSignal().Disconnect(_resizedEventCallback);
+                    Dispose(DisposeTypes.Implicit);
+                }
+                else
+                {
+                    Dispose(DisposeTypes.Explicit);
+                    System.GC.SuppressFinalize(this);
                 }
             }
-        }
 
-        private void OnResized(int resized)
-        {
-            ResizedEventArgs e = new ResizedEventArgs();
-            e.Resized = resized;
+            internal IntPtr GetImfCallbackDataPtr()
+            {
+                return (IntPtr)swigCPtr;
+            }
 
-            if (_resizedEventHandler != null)
+            internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
             {
-                _resizedEventHandler(this, e);
+                return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
             }
-        }
 
-        internal KeyboardResizedSignalType ResizedSignal()
-        {
-            KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
+            internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
+            {
+                ImfCallbackData ret = new ImfCallbackData(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
 
-        /// <summary>
-        /// ImfManager language changed event args.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public class LanguageChangedEventArgs : EventArgs
-        {
             /// <summary>
-            /// language changed.
+            /// Dispose.
             /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public int LanguageChanged
+            /// <since_tizen> 3 </since_tizen>
+            protected virtual void Dispose(DisposeTypes type)
             {
-                get;
-                set;
-            }
-        }
-
-        private delegate void LanguageChangedEventCallbackType(int languageChanged);
-        private LanguageChangedEventCallbackType _languageChangedEventCallback;
-        private event EventHandler<LanguageChangedEventArgs> _languageChangedEventHandler;
+                if (disposed)
+                {
+                    return;
+                }
 
-        /// <summary>
-        /// ImfManager language changed.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<LanguageChangedEventArgs> LanguageChanged
-        {
-            add
-            {
-                if (_languageChangedEventHandler == null)
+                if (type == DisposeTypes.Explicit)
                 {
-                    _languageChangedEventCallback = OnLanguageChanged;
-                    LanguageChangedSignal().Connect(_languageChangedEventCallback);
+                    //Called by User
+                    //Release your own managed resources here.
+                    //You should release all of your own disposable objects here.
+
                 }
 
-                _languageChangedEventHandler += value;
-            }
-            remove
-            {
-                _languageChangedEventHandler -= value;
+                //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 (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
+                if (swigCPtr.Handle != IntPtr.Zero)
                 {
-                    LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
+                    if (swigCMemOwn)
+                    {
+                        swigCMemOwn = false;
+                        NDalicManualPINVOKE.delete_InputMethodContext_CallbackData(swigCPtr);
+                    }
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
                 }
-            }
-        }
-
-        private void OnLanguageChanged(int languageChanged)
-        {
-            LanguageChangedEventArgs e = new LanguageChangedEventArgs();
-            e.LanguageChanged = languageChanged;
 
-            if (_languageChangedEventHandler != null)
-            {
-                _languageChangedEventHandler(this, e);
+                disposed = true;
             }
         }
 
-        internal LanguageChangedSignalType LanguageChangedSignal()
-        {
-            LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         /// <summary>
-        /// ImfManager keyboard type changed event arguments.
+        /// ImfManager activated event arguments.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
-        public class KeyboardTypeChangedEventArgs : EventArgs
+        public class ActivatedEventArgs : EventArgs
         {
             /// <summary>
-            /// ImfManager keyboard type
+            /// ImfManager
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            public KeyboardType KeyboardType
+            public ImfManager ImfManager
             {
                 get;
                 set;
             }
         }
 
-        private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
-        private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
-        private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
-
         /// <summary>
-        /// ImfManager keyboard type changed.
+        /// ImfManager event received event arguments.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
+        public class EventReceivedEventArgs : EventArgs
         {
-            add
-            {
-                if (_keyboardTypeChangedEventHandler == null)
-                {
-                    _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
-                    KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
-                }
-
-                _keyboardTypeChangedEventHandler += value;
-            }
-            remove
+            /// <summary>
+            /// ImfManager
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public ImfManager ImfManager
             {
-                _keyboardTypeChangedEventHandler -= value;
-
-                if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
-                {
-                    KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
-                }
+                get;
+                set;
             }
-        }
-
-        private void OnKeyboardTypeChanged(KeyboardType type)
-        {
-            KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
-
-            e.KeyboardType = type;
 
-            if (_keyboardTypeChangedEventHandler != null)
+            /// <summary>
+            /// ImfEventData
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public ImfEventData ImfEventData
             {
-                _keyboardTypeChangedEventHandler(this, e);
+                get;
+                set;
             }
         }
 
-        internal KeyboardTypeSignalType KeyboardTypeChangedSignal()
-        {
-            KeyboardTypeSignalType ret = new KeyboardTypeSignalType(NDalicManualPINVOKE.ImfManager_KeyboardTypeChangedSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         /// <summary>
-        /// The direction of the text.
+        /// ImfManager status changed event arguments.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public enum TextDirection
+        /// <since_tizen> 4 </since_tizen>
+        public class StatusChangedEventArgs : EventArgs
         {
             /// <summary>
-            /// Left to right.
-            /// </summary>
-            LeftToRight,
-            /// <summary>
-            /// Right to left.
+            /// ImfManager status
             /// </summary>
-            RightToLeft
+            /// <since_tizen> 4 </since_tizen>
+            public bool StatusChanged
+            {
+                get;
+                set;
+            }
         }
 
         /// <summary>
-        /// Events that are generated by the IMF.
+        /// ImfManager resized event.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public enum ImfEvent
+        /// <since_tizen> 4 </since_tizen>
+        public class ResizedEventArgs : EventArgs
         {
             /// <summary>
-            /// No event.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Void,
-            /// <summary>
-            /// Pre-Edit changed.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Preedit,
-            /// <summary>
-            /// Commit received.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Commit,
-            /// <summary>
-            /// An event to delete a range of characters from the string.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            DeleteSurrounding,
-            /// <summary>
-            /// An event to query string and the cursor position.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            GetSurrounding,
-            /// <summary>
-            /// Private command sent from the input panel.
+            /// resized.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            PrivateCommand
+            public int Resized
+            {
+                get;
+                set;
+            }
         }
 
         /// <summary>
-        /// Enumeration for the state of the input panel.
+        /// ImfManager language changed event args.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public enum State
+        /// <since_tizen> 4 </since_tizen>
+        public class LanguageChangedEventArgs : EventArgs
         {
             /// <summary>
-            /// Unknown state.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Default = 0,
-            /// <summary>
-            /// Input panel is shown.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Show,
-            /// <summary>
-            /// Input panel is hidden.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Hide,
-            /// <summary>
-            /// Input panel in process of being shown.
+            /// language changed.
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            WillShow
+            public int LanguageChanged
+            {
+                get;
+                set;
+            }
         }
 
         /// <summary>
-        /// Enumeration for the types of keyboard.
+        /// ImfManager keyboard type changed event arguments.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
-        public enum KeyboardType
+        public class KeyboardTypeChangedEventArgs : EventArgs
         {
             /// <summary>
-            /// Software keyboard (virtual keyboard) is default.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            SoftwareKeyboard,
-            /// <summary>
-            /// Hardware keyboard.
+            /// ImfManager keyboard type
             /// </summary>
             /// <since_tizen> 4 </since_tizen>
-            HardwareKeyboard
+            public KeyboardType KeyboardType
+            {
+                get;
+                set;
+            }
         }
     }
 }