[Tizen] Add obsolete attribute for deprecated apis, backward compatibility
authorxb.teng <xb.teng@samsung.com>
Wed, 26 Jul 2017 21:55:03 +0000 (05:55 +0800)
committerdongsug.song <dongsug.song@samsung.com>
Wed, 26 Jul 2017 23:48:26 +0000 (08:48 +0900)
Change-Id: I62b9db17bbb56ab5a5f4383745ca8ce73a7d554a

15 files changed:
src/Tizen.NUI/src/internal/ActivatedSignalType.cs
src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs
src/Tizen.NUI/src/internal/ImfEventSignalType.cs
src/Tizen.NUI/src/internal/ImfVoidSignalType.cs
src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs
src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs
src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs
src/Tizen.NUI/src/internal/SignalObserver.cs
src/Tizen.NUI/src/internal/SlotObserver.cs
src/Tizen.NUI/src/internal/StatusSignalType.cs
src/Tizen.NUI/src/internal/Uint16Pair.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/ImfManager.cs
src/Tizen.NUI/src/public/Position2D.cs
src/Tizen.NUI/src/public/Size2D.cs

index 4e1c714..8728e98 100755 (executable)
 * limitations under the License.
 *
 */
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class ActivatedSignalType : global::System.IDisposable
+    [Obsolete("Please do not use! this will be deprecated")]
+    public class ActivatedSignalType : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
index 35feff7..3505e46 100755 (executable)
 * limitations under the License.
 *
 */
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class ConnectionTrackerInterface : SignalObserver
+    [Obsolete("Please do not use! this will be internal")]
+    public class ConnectionTrackerInterface : SignalObserver
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
index 1ccbdc8..a2334ac 100755 (executable)
 * limitations under the License.
 *
 */
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class ImfEventSignalType : global::System.IDisposable
+    [Obsolete("Please do not use! this will be deprecated")]
+    public class ImfEventSignalType : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
index 549be57..ca597c1 100755 (executable)
 * limitations under the License.
 *
 */
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class ImfVoidSignalType : global::System.IDisposable
+    [Obsolete("Please do not use! this will be internal")]
+    public class ImfVoidSignalType : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
index 0191095..9413739 100755 (executable)
@@ -7,11 +7,13 @@
 // Do not make changes to this file unless you know what you are doing--modify
 // the SWIG interface file instead.
 //------------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class SWIGTYPE_p_CallbackBase
+    [Obsolete("Please do not use! this will be internal")]
+    public class SWIGTYPE_p_CallbackBase
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
index 22ff2b9..0030697 100755 (executable)
@@ -7,11 +7,13 @@
 // Do not make changes to this file unless you know what you are doing--modify
 // the SWIG interface file instead.
 //------------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class SWIGTYPE_p_Dali__CallbackBase
+    [Obsolete("Please do not use! this will be internal")]
+    public class SWIGTYPE_p_Dali__CallbackBase
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
index 1e123d8..33d505a 100755 (executable)
@@ -7,11 +7,13 @@
 // Do not make changes to this file unless you know what you are doing--modify
 // the SWIG interface file instead.
 //------------------------------------------------------------------------------
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class SWIGTYPE_p_Dali__FunctorDelegate
+    [Obsolete("Please do not use! this will be internal")]
+    public class SWIGTYPE_p_Dali__FunctorDelegate
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
index d1916fd..2e98240 100755 (executable)
 * limitations under the License.
 *
 */
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class SignalObserver : global::System.IDisposable
+    [Obsolete("Please do not use! this will be internal")]
+    public class SignalObserver : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
index 2c55bff..9b034fe 100755 (executable)
 * limitations under the License.
 *
 */
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class SlotObserver : global::System.IDisposable
+    [Obsolete("Please do not use! this will be internal")]
+    public class SlotObserver : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
index 4c9de84..70c0c8f 100755 (executable)
 * limitations under the License.
 *
 */
+using System;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
-
-    internal class StatusSignalType : global::System.IDisposable
+    [Obsolete("Please do not use! this will be deprecated")]
+    public class StatusSignalType : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
index bd5c273..c2d201f 100755 (executable)
 *
 */
 
+using System;
+
 namespace Tizen.NUI
 {
 
-    internal class Uint16Pair : global::System.IDisposable
+    [Obsolete("Please do not use! this will be deprecated")]
+    public class Uint16Pair : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         protected bool swigCMemOwn;
index d0ddfee..d220a7e 100755 (executable)
@@ -1853,7 +1853,13 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        [Obsolete("Please do not use! this will be internal property")]
+        /// <summary>
+        /// Returns the natural size of the view.
+        /// </summary>
+        /// <remarks>
+        /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
+        /// </remarks>
+        [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
         public Vector3 NaturalSize
         {
             get
@@ -1866,6 +1872,24 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Returns the natural size (Size2D) of the view.
+        /// </summary>
+        /// <remarks>
+        /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
+        /// </remarks>
+        public Size2D NaturalSize2D
+        {
+            get
+            {
+                Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+                return new Size2D((int)temp.Width, (int)temp.Height);
+            }
+        }
+
+        /// <summary>
         /// Shows the View.
         /// </summary>
         /// <remarks>
@@ -3764,7 +3788,7 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        [Obsolete("Please do not use! this will be deprecated")]
+        [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
         public Size Size
         {
             get
index 9304124..1706bab 100755 (executable)
@@ -25,14 +25,14 @@ namespace Tizen.NUI
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
-        internal ImfManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
+        internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfManager obj)
         {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
         }
 
         protected override void Dispose(DisposeTypes type)
@@ -54,14 +54,14 @@ namespace Tizen.NUI
             //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 (swigCPtr.Handle != IntPtr.Zero)
             {
                 if (swigCMemOwn)
                 {
                     swigCMemOwn = false;
                     NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
                 }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
             }
 
             base.Dispose(type);
@@ -75,7 +75,7 @@ namespace Tizen.NUI
             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
             protected bool swigCMemOwn;
 
-            internal ImfEventData(global::System.IntPtr cPtr, bool cMemoryOwn)
+            internal ImfEventData(IntPtr cPtr, bool cMemoryOwn)
             {
                 swigCMemOwn = cMemoryOwn;
                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
@@ -83,7 +83,7 @@ namespace Tizen.NUI
 
             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfEventData obj)
             {
-                return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+                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)
@@ -142,20 +142,20 @@ namespace Tizen.NUI
                 //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 (swigCPtr.Handle != IntPtr.Zero)
                 {
                     if (swigCMemOwn)
                     {
                         swigCMemOwn = false;
                         NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr);
                     }
-                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
                 }
 
                 disposed = true;
             }
 
-            internal static ImfEventData GetImfEventDataFromPtr(global::System.IntPtr cPtr)
+            internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr)
             {
                 ImfEventData ret = new ImfEventData(cPtr, false);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -185,6 +185,25 @@ namespace Tizen.NUI
             /// <summary>
             /// The pre-edit or commit string.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            public string predictiveString
+            {
+                set
+                {
+                    NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+                get
+                {
+                    string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    return ret;
+                }
+            }
+
+            /// <summary>
+            /// The pre-edit or commit string.
+            /// </summary>
             public string PredictiveString
             {
                 set
@@ -203,6 +222,25 @@ namespace Tizen.NUI
             /// <summary>
             /// The name of the event from the IMF.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            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;
+                }
+            }
+
+            /// <summary>
+            /// The name of the event from the IMF.
+            /// </summary>
             public ImfManager.ImfEvent EventName
             {
                 set
@@ -221,6 +259,25 @@ namespace Tizen.NUI
             /// <summary>
             /// Start position from the current cursor position to start deleting characters.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            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;
+                }
+            }
+
+            /// <summary>
+            /// Start position from the current cursor position to start deleting characters.
+            /// </summary>
             public int CursorOffset
             {
                 set
@@ -239,6 +296,25 @@ namespace Tizen.NUI
             /// <summary>
             /// Number of characters to delete from the cursorOffset.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            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;
+                }
+            }
+
+            /// <summary>
+            /// Number of characters to delete from the cursorOffset.
+            /// </summary>
             public int NumberOfChars
             {
                 set
@@ -269,7 +345,7 @@ namespace Tizen.NUI
                 return (IntPtr)swigCPtr;
             }
 
-            internal ImfCallbackData(global::System.IntPtr cPtr, bool cMemoryOwn)
+            internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn)
             {
                 swigCMemOwn = cMemoryOwn;
                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
@@ -277,7 +353,7 @@ namespace Tizen.NUI
 
             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj)
             {
-                return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+                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)
@@ -336,20 +412,20 @@ namespace Tizen.NUI
                 //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 (swigCPtr.Handle != IntPtr.Zero)
                 {
                     if (swigCMemOwn)
                     {
                         swigCMemOwn = false;
                         NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr);
                     }
-                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
                 }
 
                 disposed = true;
             }
 
-            internal static ImfCallbackData GetImfCallbackDataFromPtr(global::System.IntPtr cPtr)
+            internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr)
             {
                 ImfCallbackData ret = new ImfCallbackData(cPtr, false);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -379,6 +455,25 @@ namespace Tizen.NUI
             /// <summary>
             /// Current text string.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            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;
+                }
+            }
+
+            /// <summary>
+            /// Current text string.
+            /// </summary>
             public string CurrentText
             {
                 set
@@ -397,6 +492,25 @@ namespace Tizen.NUI
             /// <summary>
             /// Current text string.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            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;
+                }
+            }
+
+            /// <summary>
+            /// Current text string.
+            /// </summary>
             public int CursorPosition
             {
                 set
@@ -415,6 +529,25 @@ namespace Tizen.NUI
             /// <summary>
             /// If cursor position needs to be updated.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            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;
+                }
+            }
+
+            /// <summary>
+            /// If cursor position needs to be updated.
+            /// </summary>
             public bool Update
             {
                 set
@@ -433,6 +566,25 @@ namespace Tizen.NUI
             /// <summary>
             /// Flag if preedit reset is required.
             /// </summary>
+            [Obsolete("Please do not use! this will be deprecated")]
+            public bool preeditResetRequired
+            {
+                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;
+                }
+            }
+
+            /// <summary>
+            /// Flag if preedit reset is required.
+            /// </summary>
             public bool PreeditResetRequired
             {
                 set
@@ -708,7 +860,7 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal static ImfManager GetImfManagerFromPtr(global::System.IntPtr cPtr)
+        internal static ImfManager GetImfManagerFromPtr(IntPtr cPtr)
         {
             ImfManager ret = new ImfManager(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -718,6 +870,7 @@ namespace Tizen.NUI
         /// <summary>
         /// ImfManager activated event arguments.
         /// </summary>
+        [Obsolete("Please do not use! this will be deprecated")]
         public class ImfManagerActivatedEventArgs : EventArgs
         {
             public ImfManager ImfManager
@@ -730,12 +883,12 @@ namespace Tizen.NUI
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data);
         private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback;
-
         private event EventHandler<ImfManagerActivatedEventArgs> _imfManagerActivatedEventHandler;
 
         /// <summary>
-        /// ImfManager activated.
+        /// ImfManager activated event.
         /// </summary>
+        [Obsolete("Please do not use! this will be deprecated")]
         public event EventHandler<ImfManagerActivatedEventArgs> ImfManagerActivated
         {
             add
@@ -771,7 +924,66 @@ namespace Tizen.NUI
             }
         }
 
-        internal ActivatedSignalType ActivatedSignal()
+        /// <summary>
+        /// ImfManager activated event arguments.
+        /// </summary>
+        public class ActivatedEventArgs : EventArgs
+        {
+            public ImfManager ImfManager
+            {
+                get;
+                set;
+            }
+        }
+
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void ActivatedEventCallbackType(IntPtr data);
+        private ActivatedEventCallbackType _activatedEventCallback;
+        private event EventHandler<ActivatedEventArgs> _activatedEventHandler;
+
+        /// <summary>
+        /// ImfManager activated.
+        /// </summary>
+        public event EventHandler<ActivatedEventArgs> Activated
+        {
+            add
+            {
+                if (_activatedEventHandler == null)
+                {
+                    _activatedEventCallback = OnActivated;
+                    ActivatedSignal().Connect(_activatedEventCallback);
+                }
+
+                _activatedEventHandler += value;
+            }
+            remove
+            {
+                _activatedEventHandler -= value;
+
+                if (_activatedEventHandler == null && _activatedEventCallback != null)
+                {
+                    ActivatedSignal().Disconnect(_activatedEventCallback);
+                }
+            }
+        }
+
+        private void OnActivated(IntPtr data)
+        {
+            ActivatedEventArgs e = new ActivatedEventArgs();
+
+            e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
+
+            if (_activatedEventHandler != null)
+            {
+                _activatedEventHandler(this, e);
+            }
+        }
+
+        /// <summary>
+        /// ImfManager activated signal.
+        /// </summary>
+        [Obsolete("Please do not use! this will be internal")]
+        public ActivatedSignalType ActivatedSignal()
         {
             ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -781,6 +993,7 @@ namespace Tizen.NUI
         /// <summary>
         /// ImfManager event received event arguments.
         /// </summary>
+        [Obsolete("Please do not use! this will be deprecated")]
         public class ImfManagerEventReceivedEventArgs : EventArgs
         {
             public ImfManager ImfManager
@@ -788,22 +1001,17 @@ namespace Tizen.NUI
                 get;
                 set;
             }
-
-            public ImfEventData ImfEventData
-            {
-                get;
-                set;
-            }
         }
 
-        private delegate global::System.IntPtr ImfManagerEventReceivedEventCallbackType(global::System.IntPtr imfManager, global::System.IntPtr imfEventData);
+        private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data);
         private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback;
+        private event EventHandler<ImfManagerEventReceivedEventArgs> _imfManagerEventReceivedEventHandler;
 
-        private event EventHandlerWithReturnType<object, ImfManagerEventReceivedEventArgs, ImfCallbackData> _imfManagerEventReceivedEventHandler;
         /// <summary>
         /// ImfManager event received.
         /// </summary>
-        public event EventHandlerWithReturnType<object, ImfManagerEventReceivedEventArgs, ImfCallbackData> ImfManagerEventReceived
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandler<ImfManagerEventReceivedEventArgs> ImfManagerEventReceived
         {
             add
             {
@@ -826,18 +1034,78 @@ namespace Tizen.NUI
             }
         }
 
-        private global::System.IntPtr OnImfManagerEventReceived(global::System.IntPtr imfManager, global::System.IntPtr imfEventData)
+        private void OnImfManagerEventReceived(global::System.IntPtr data)
+        {
+            ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
+
+            e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
+
+            if (_imfManagerEventReceivedEventHandler != null)
+            {
+                _imfManagerEventReceivedEventHandler(this, e);
+            }
+        }
+
+        /// <summary>
+        /// ImfManager event received event arguments.
+        /// </summary>
+        public class EventReceivedEventArgs : EventArgs
+        {
+            public ImfManager ImfManager
+            {
+                get;
+                set;
+            }
+
+            public ImfEventData ImfEventData
+            {
+                get;
+                set;
+            }
+        }
+
+        private delegate IntPtr EventReceivedEventCallbackType(IntPtr imfManager, IntPtr imfEventData);
+        private EventReceivedEventCallbackType _eventReceivedEventCallback;
+        private event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> _eventReceivedEventHandler;
+
+        /// <summary>
+        /// ImfManager event received.
+        /// </summary>
+        public event EventHandlerWithReturnType<object, EventReceivedEventArgs, ImfCallbackData> EventReceived
+        {
+            add
+            {
+                if (_eventReceivedEventHandler == null)
+                {
+                    _eventReceivedEventCallback = OnEventReceived;
+                    EventReceivedSignal().Connect(_eventReceivedEventCallback);
+                }
+
+                _eventReceivedEventHandler += value;
+            }
+            remove
+            {
+                _eventReceivedEventHandler -= value;
+
+                if (_eventReceivedEventHandler == null && _eventReceivedEventCallback != null)
+                {
+                    EventReceivedSignal().Disconnect(_eventReceivedEventCallback);
+                }
+            }
+        }
+
+        private IntPtr OnEventReceived(IntPtr imfManager, IntPtr imfEventData)
         {
             ImfCallbackData imfCallbackData = null;
 
-            ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs();
+            EventReceivedEventArgs e = new EventReceivedEventArgs();
 
             e.ImfManager = ImfManager.GetImfManagerFromPtr(imfManager);
             e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData);
 
-            if (_imfManagerEventReceivedEventHandler != null)
+            if (_eventReceivedEventHandler != null)
             {
-                imfCallbackData = _imfManagerEventReceivedEventHandler(this, e);
+                imfCallbackData = _eventReceivedEventHandler(this, e);
             }
             if (imfCallbackData != null)
             {
@@ -849,7 +1117,11 @@ namespace Tizen.NUI
             }
         }
 
-        internal ImfEventSignalType EventReceivedSignal()
+        /// <summary>
+        /// ImfManager event received signal.
+        /// </summary>
+        [Obsolete("Please do not use! this will be internal")]
+        public ImfEventSignalType EventReceivedSignal()
         {
             ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -859,22 +1131,24 @@ namespace Tizen.NUI
         /// <summary>
         /// ImfManager status changed event arguments.
         /// </summary>
+        [Obsolete("Please do not use! this will be deprecated")]
         public class ImfManagerStatusChangedEventArgs : EventArgs
         {
-            public bool StatusChanged
+            public ImfManager ImfManager
             {
                 get;
                 set;
             }
         }
 
-        private delegate void ImfManagerStatusChangedEventCallbackType(bool statusChanged);
+        private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data);
         private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback;
-
         private event EventHandler<ImfManagerStatusChangedEventArgs> _imfManagerStatusChangedEventHandler;
+
         /// <summary>
         /// ImfManager status changed.
         /// </summary>
+        [Obsolete("Please do not use! this will be deprecated")]
         public event EventHandler<ImfManagerStatusChangedEventArgs> ImfManagerStatusChanged
         {
             add
@@ -898,11 +1172,11 @@ namespace Tizen.NUI
             }
         }
 
-        private void OnImfManagerStatusChanged(bool statusChanged)
+        private void OnImfManagerStatusChanged(global::System.IntPtr data)
         {
             ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs();
 
-            e.StatusChanged = statusChanged;
+            e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
 
             if (_imfManagerStatusChangedEventHandler != null)
             {
@@ -910,21 +1184,93 @@ namespace Tizen.NUI
             }
         }
 
-        internal StatusSignalType StatusChangedSignal()
+        /// <summary>
+        /// ImfManager status changed event arguments.
+        /// </summary>
+        public class StatusChangedEventArgs : EventArgs
+        {
+            public bool StatusChanged
+            {
+                get;
+                set;
+            }
+        }
+
+        private delegate void StatusChangedEventCallbackType(bool statusChanged);
+        private StatusChangedEventCallbackType _statusChangedEventCallback;
+        private event EventHandler<StatusChangedEventArgs> _statusChangedEventHandler;
+
+        /// <summary>
+        /// ImfManager status changed.
+        /// </summary>
+        public event EventHandler<StatusChangedEventArgs> StatusChanged
+        {
+            add
+            {
+                if (_statusChangedEventHandler == null)
+                {
+                    _statusChangedEventCallback = OnStatusChanged;
+                    StatusChangedSignal().Connect(_statusChangedEventCallback);
+                }
+
+                _statusChangedEventHandler += value;
+            }
+            remove
+            {
+                _statusChangedEventHandler -= value;
+
+                if (_statusChangedEventHandler == null && _statusChangedEventCallback != null)
+                {
+                    StatusChangedSignal().Disconnect(_statusChangedEventCallback);
+                }
+            }
+        }
+
+        private void OnStatusChanged(bool statusChanged)
+        {
+            StatusChangedEventArgs e = new StatusChangedEventArgs();
+
+            e.StatusChanged = statusChanged;
+
+            if (_statusChangedEventHandler != null)
+            {
+                _statusChangedEventHandler(this, e);
+            }
+        }
+
+        /// <summary>
+        /// ImfManager status changed signal.
+        /// </summary>
+        [Obsolete("Please do not use! this will be internal")]
+        public StatusSignalType StatusChangedSignal()
         {
             StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        private delegate void ImfManagerResizedEventCallbackType();
+        /// <summary>
+        /// ImfManager resized event arguments.
+        /// </summary>
+        [Obsolete("Please do not use! this will be deprecated")]
+        public class ImfManagerResizedEventArgs : EventArgs
+        {
+            public ImfManager ImfManager
+            {
+                get;
+                set;
+            }
+        }
+
+        private delegate void ImfManagerResizedEventCallbackType(IntPtr data);
         private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback;
+        private event EventHandler<ImfManagerResizedEventArgs> _imfManagerResizedEventHandler;
 
-        private event EventHandler _imfManagerResizedEventHandler;
         /// <summary>
-        /// ImfManager resized.
+        /// ImfManager resized event.
         /// </summary>
-        public event EventHandler ImfManagerResized
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandler<ImfManagerResizedEventArgs> ImfManagerResized
         {
             add
             {
@@ -947,29 +1293,89 @@ namespace Tizen.NUI
             }
         }
 
-        private void OnImfManagerResized()
+        private void OnImfManagerResized(IntPtr data)
         {
+            ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs();
+
+            e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
+
             if (_imfManagerResizedEventHandler != null)
             {
-                _imfManagerResizedEventHandler(this, null);
+                _imfManagerResizedEventHandler(this, e);
+            }
+        }
+
+        private delegate void ResizedEventCallbackType();
+        private ResizedEventCallbackType _resizedEventCallback;
+        private event EventHandler _resizedEventHandler;
+
+        /// <summary>
+        /// ImfManager resized.
+        /// </summary>
+        public event EventHandler Resized
+        {
+            add
+            {
+                if (_resizedEventHandler == null)
+                {
+                    _resizedEventCallback = OnResized;
+                    ResizedSignal().Connect(_resizedEventCallback);
+                }
+
+                _resizedEventHandler += value;
+            }
+            remove
+            {
+                _resizedEventHandler -= value;
+
+                if (_resizedEventHandler == null && _resizedEventCallback != null)
+                {
+                    ResizedSignal().Disconnect(_resizedEventCallback);
+                }
+            }
+        }
+
+        private void OnResized()
+        {
+            if (_resizedEventHandler != null)
+            {
+                _resizedEventHandler(this, null);
             }
         }
 
-        internal ImfVoidSignalType ResizedSignal()
+        /// <summary>
+        /// ImfManager resized signal.
+        /// </summary>
+        [Obsolete("Please do not use! this will be internal")]
+        public ImfVoidSignalType ResizedSignal()
         {
             ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        private delegate void ImfManagerLanguageChangedEventCallbackType();
+        /// <summary>
+        /// ImfManager language changed event arguments.
+        /// </summary>
+        [Obsolete("Please do not use! this will be deprecated")]
+        public class ImfManagerLanguageChangedEventArgs : EventArgs
+        {
+            public ImfManager ImfManager
+            {
+                get;
+                set;
+            }
+        }
+
+        private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data);
         private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback;
+        private event EventHandler<ImfManagerLanguageChangedEventArgs> _imfManagerLanguageChangedEventHandler;
 
-        private event EventHandler _imfManagerLanguageChangedEventHandler;
         /// <summary>
-        /// ImfManager language changed.
+        /// ImfManager language changed event.
         /// </summary>
-        public event EventHandler ImfManagerLanguageChanged
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandler<ImfManagerLanguageChangedEventArgs> ImfManagerLanguageChanged
         {
             add
             {
@@ -992,15 +1398,61 @@ namespace Tizen.NUI
             }
         }
 
-        private void OnImfManagerLanguageChanged()
+        private void OnImfManagerLanguageChanged(IntPtr data)
         {
+            ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs();
+
+            e.ImfManager = ImfManager.GetImfManagerFromPtr(data);
+
             if (_imfManagerLanguageChangedEventHandler != null)
             {
-                _imfManagerLanguageChangedEventHandler(this, null);
+                _imfManagerLanguageChangedEventHandler(this, e);
             }
         }
 
-        internal ImfVoidSignalType LanguageChangedSignal()
+        private delegate void LanguageChangedEventCallbackType();
+        private LanguageChangedEventCallbackType _languageChangedEventCallback;
+        private event EventHandler _languageChangedEventHandler;
+
+        /// <summary>
+        /// ImfManager language changed.
+        /// </summary>
+        public event EventHandler LanguageChanged
+        {
+            add
+            {
+                if (_languageChangedEventHandler == null)
+                {
+                    _languageChangedEventCallback = OnLanguageChanged;
+                    LanguageChangedSignal().Connect(_languageChangedEventCallback);
+                }
+
+                _languageChangedEventHandler += value;
+            }
+            remove
+            {
+                _languageChangedEventHandler -= value;
+
+                if (_languageChangedEventHandler == null && _languageChangedEventCallback != null)
+                {
+                    LanguageChangedSignal().Disconnect(_languageChangedEventCallback);
+                }
+            }
+        }
+
+        private void OnLanguageChanged()
+        {
+            if (_languageChangedEventHandler != null)
+            {
+                _languageChangedEventHandler(this, null);
+            }
+        }
+
+        /// <summary>
+        /// ImfManager language changed signal.
+        /// </summary>
+        [Obsolete("Please do not use! this will be internal")]
+        public ImfVoidSignalType LanguageChangedSignal()
         {
             ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -1010,7 +1462,7 @@ namespace Tizen.NUI
         /// <summary>
         /// ImfManager keyboard type changed event arguments.
         /// </summary>
-        public class ImfKeyboardTypeChangedEventArgs : EventArgs
+        public class KeyboardTypeChangedEventArgs : EventArgs
         {
             public KeyboardType KeyboardType
             {
@@ -1019,45 +1471,45 @@ namespace Tizen.NUI
             }
         }
 
-        private delegate void ImfKeyboardTypeChangedEventCallbackType(KeyboardType type);
-        private ImfKeyboardTypeChangedEventCallbackType _imfKeyboardTypeChangedEventCallback;
+        private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type);
+        private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback;
+        private event EventHandler<KeyboardTypeChangedEventArgs> _keyboardTypeChangedEventHandler;
 
-        private event EventHandler<ImfKeyboardTypeChangedEventArgs> _imfKeyboardTypeChangedEventHandler;
         /// <summary>
         /// ImfManager keyboard type changed.
         /// </summary>
-        public event EventHandler<ImfKeyboardTypeChangedEventArgs> ImfKeyboardTypeChanged
+        public event EventHandler<KeyboardTypeChangedEventArgs> KeyboardTypeChanged
         {
             add
             {
-                if (_imfKeyboardTypeChangedEventHandler == null)
+                if (_keyboardTypeChangedEventHandler == null)
                 {
-                    _imfKeyboardTypeChangedEventCallback = OnImfKeyboardTypeChanged;
-                    KeyboardTypeChangedSignal().Connect(_imfKeyboardTypeChangedEventCallback);
+                    _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged;
+                    KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback);
                 }
 
-                _imfKeyboardTypeChangedEventHandler += value;
+                _keyboardTypeChangedEventHandler += value;
             }
             remove
             {
-                _imfKeyboardTypeChangedEventHandler -= value;
+                _keyboardTypeChangedEventHandler -= value;
 
-                if (_imfKeyboardTypeChangedEventHandler == null && _imfKeyboardTypeChangedEventCallback != null)
+                if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null)
                 {
-                    KeyboardTypeChangedSignal().Disconnect(_imfKeyboardTypeChangedEventCallback);
+                    KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
                 }
             }
         }
 
-        private void OnImfKeyboardTypeChanged(KeyboardType type)
+        private void OnKeyboardTypeChanged(KeyboardType type)
         {
-            ImfKeyboardTypeChangedEventArgs e = new ImfKeyboardTypeChangedEventArgs();
+            KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs();
 
             e.KeyboardType = type;
 
-            if (_imfKeyboardTypeChangedEventHandler != null)
+            if (_keyboardTypeChangedEventHandler != null)
             {
-                _imfKeyboardTypeChangedEventHandler(this, e);
+                _keyboardTypeChangedEventHandler(this, e);
             }
         }
 
index c773814..5faad48 100755 (executable)
  *
  */
 
-namespace Tizen.NUI\r
-{\r
-\r
+namespace Tizen.NUI
+{
+
     /// <summary>
     /// Position2D is a two dimensional vector.
     /// </summary>
-    public class Position2D : global::System.IDisposable\r
-    {\r
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
-        protected bool swigCMemOwn;\r
-\r
-        internal Position2D(global::System.IntPtr cPtr, bool cMemoryOwn)\r
-        {\r
-            swigCMemOwn = cMemoryOwn;\r
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
-        }\r
-\r
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position2D obj)\r
-        {\r
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
-        }\r
-\r
-        //A Flag to check who called Dispose(). (By User or DisposeQueue)\r
-        private bool isDisposeQueued = false;\r
-        //A Flat to check if it is already disposed.\r
-        protected bool disposed = false;\r
-\r
-        ~Position2D()\r
-        {\r
-            if (!isDisposeQueued)\r
-            {\r
-                isDisposeQueued = true;\r
-                DisposeQueue.Instance.Add(this);\r
-            }\r
-        }\r
-\r
-        public void Dispose()\r
-        {\r
-            //Throw excpetion if Dispose() is called in separate thread.\r
-            if (!Window.IsInstalled())\r
-            {\r
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");\r
-            }\r
-\r
-            if (isDisposeQueued)\r
-            {\r
-                Dispose(DisposeTypes.Implicit);\r
-            }\r
-            else\r
-            {\r
-                Dispose(DisposeTypes.Explicit);\r
-                System.GC.SuppressFinalize(this);\r
-            }\r
-        }\r
-\r
-        protected virtual void Dispose(DisposeTypes type)\r
-        {\r
-            if (disposed)\r
-            {\r
-                return;\r
-            }\r
-\r
-            if (type == DisposeTypes.Explicit)\r
-            {\r
-                //Called by User\r
-                //Release your own managed resources here.\r
-                //You should release all of your own disposable objects here.\r
-            }\r
-\r
-            //Release your own unmanaged resources here.\r
-            //You should not access any managed member here except static instance.\r
-            //because the execution order of Finalizes is non-deterministic.\r
-\r
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
-            {\r
-                if (swigCMemOwn)\r
-                {\r
-                    swigCMemOwn = false;\r
-                    NDalicPINVOKE.delete_Vector2(swigCPtr);\r
-                }\r
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
-            }\r
-            disposed = true;\r
-        }\r
-\r
+    public class Position2D : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+
+        internal Position2D(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(Position2D 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;
+
+        ~Position2D()
+        {
+            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;
+                    NDalicPINVOKE.delete_Vector2(swigCPtr);
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+            disposed = true;
+        }
+
         /// <summary>
         /// Addition operator.
         /// </summary>
         /// <param name="arg1">Vector to add</param>
         /// <param name="arg2">Vector to add</param>
         /// <returns>A vector containing the result of the addition</returns>
-        public static Position2D operator +(Position2D arg1, Position2D arg2)\r
-        {\r
-            return arg1.Add(arg2);\r
-        }\r
-\r
+        public static Position2D operator +(Position2D arg1, Position2D arg2)
+        {
+            return arg1.Add(arg2);
+        }
+
         /// <summary>
         /// Subtraction operator.
         /// </summary>
         /// <param name="arg1">Vector to subtract</param>
         /// <param name="arg2">Vector to subtract</param>
         /// <returns>A vector containing the result of the subtraction</returns>
-        public static Position2D operator -(Position2D arg1, Position2D arg2)\r
-        {\r
-            return arg1.Subtract(arg2);\r
-        }\r
-\r
+        public static Position2D operator -(Position2D arg1, Position2D arg2)
+        {
+            return arg1.Subtract(arg2);
+        }
+
         /// <summary>
         /// Unary negation operator.
         /// </summary>
         /// <param name="arg1">Vector to netate</param>
         /// <returns>A vector containing the negation</returns>
-        public static Position2D operator -(Position2D arg1)\r
-        {\r
-            return arg1.Subtract();\r
-        }\r
-\r
+        public static Position2D operator -(Position2D arg1)
+        {
+            return arg1.Subtract();
+        }
+
         /// <summary>
         /// Multiplication operator.
         /// </summary>
         /// <param name="arg1">Vector to multiply</param>
         /// <param name="arg2">Vector to multiply</param>
         /// <returns>A vector containing the result of the multiplication</returns>
-        public static Position2D operator *(Position2D arg1, Position2D arg2)\r
-        {\r
-            return arg1.Multiply(arg2);\r
-        }\r
-\r
+        public static Position2D operator *(Position2D arg1, Position2D arg2)
+        {
+            return arg1.Multiply(arg2);
+        }
+
         /// <summary>
         /// Multiplication operator.
         /// </summary>
         /// <param name="arg1">Vector to multiply</param>
         /// <param name="arg2">The int value to scale the vector</param>
         /// <returns>A vector containing the result of the multiplication</returns>
-        public static Position2D operator *(Position2D arg1, int arg2)\r
-        {\r
-            return arg1.Multiply(arg2);\r
-        }\r
-\r
+        public static Position2D operator *(Position2D arg1, int arg2)
+        {
+            return arg1.Multiply(arg2);
+        }
+
         /// <summary>
         /// Division operator.
         /// </summary>
         /// <param name="arg1">Vector to divide</param>
         /// <param name="arg2">Vector to divide</param>
         /// <returns>A vector containing the result of the division</returns>
-        public static Position2D operator /(Position2D arg1, Position2D arg2)\r
-        {\r
-            return arg1.Divide(arg2);\r
-        }\r
-\r
+        public static Position2D operator /(Position2D arg1, Position2D arg2)
+        {
+            return arg1.Divide(arg2);
+        }
+
         /// <summary>
         /// Division operator.
         /// </summary>
         /// <param name="arg1">Vector to divide</param>
         /// <param name="arg2">The int value to scale the vector by</param>
         /// <returns>A vector containing the result of the division</returns>
-        public static Position2D operator /(Position2D arg1, int arg2)\r
-        {\r
-            return arg1.Divide(arg2);\r
-        }\r
-\r
+        public static Position2D operator /(Position2D arg1, int arg2)
+        {
+            return arg1.Divide(arg2);
+        }
+
         /// <summary>
         /// Const array subscript operator overload. Should be 0, or 1.
         /// </summary>
         /// <param name="index">Subscript index</param>
         /// <returns>The float at the given index</returns>
-        public float this[uint index]\r
-        {\r
-            get\r
-            {\r
-                return ValueOfIndex(index);\r
-            }\r
-        }\r
-\r
-        internal static Position2D GetPosition2DFromPtr(global::System.IntPtr cPtr)\r
-        {\r
-            Position2D ret = new Position2D(cPtr, false);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
+        public float this[uint index]
+        {
+            get
+            {
+                return ValueOfIndex(index);
+            }
+        }
+
+        internal static Position2D GetPosition2DFromPtr(global::System.IntPtr cPtr)
+        {
+            Position2D ret = new Position2D(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         /// <summary>
         /// Constructor
         /// </summary>
-        public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true)\r
-        {\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
+        public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
         /// <summary>
         /// Constructor
         /// </summary>
         /// <param name="x">x component</param>
         /// <param name="y">y component</param>
-        public Position2D(int x, int y) : this(NDalicPINVOKE.new_Vector2__SWIG_1((float)x, (float)y), true)\r
-        {\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
+        public Position2D(int x, int y) : this(NDalicPINVOKE.new_Vector2__SWIG_1((float)x, (float)y), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
         /// <summary>
         /// Constructor
         /// </summary>
         /// <param name="position">Position to create this vector from</param>
-        public Position2D(Position position) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Position.getCPtr(position)), true)\r
-        {\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-        }\r
-\r
-        private Position2D Add(Position2D rhs)\r
-        {\r
-            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Add(swigCPtr, Position2D.getCPtr(rhs)), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        private Position2D Subtract(Position2D rhs)\r
-        {\r
-            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-\r
-        private Position2D Multiply(Position2D rhs)\r
-        {\r
-            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        private Position2D Multiply(int rhs)\r
-        {\r
-            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, (float)rhs), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-\r
-        private Position2D Divide(Position2D rhs)\r
-        {\r
-            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        private Position2D Divide(int rhs)\r
-        {\r
-            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, (float)rhs), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        private Position2D Subtract()\r
-        {\r
-            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
+        public Position2D(Position position) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Position.getCPtr(position)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        private Position2D Add(Position2D rhs)
+        {
+            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Add(swigCPtr, Position2D.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private Position2D Subtract(Position2D rhs)
+        {
+            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        private Position2D Multiply(Position2D rhs)
+        {
+            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private Position2D Multiply(int rhs)
+        {
+            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, (float)rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        private Position2D Divide(Position2D rhs)
+        {
+            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private Position2D Divide(int rhs)
+        {
+            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, (float)rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private Position2D Subtract()
+        {
+            Position2D ret = new Position2D(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         /// <summary>
         /// Compare if rhs is equal to.
         /// </summary>
         /// <param name="rhs">The vector to compare</param>
         /// <returns>Returns true if the two vectors are equal, otherwise false</returns>
-        public bool EqualTo(Position2D rhs)\r
-        {\r
-            bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
+        public bool EqualTo(Position2D rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         /// <summary>
         /// Compare if rhs is not equal to.
         /// </summary>
         /// <param name="rhs">The vector to compare</param>
         /// <returns>Returns true if the two vectors are not equal, otherwise false</returns>
-        public bool NotEqualTo(Position2D rhs)\r
-        {\r
-            bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Position2D.getCPtr(rhs));\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
-        private int ValueOfIndex(uint index)\r
-        {\r
-            int ret = (int)NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index);\r
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            return ret;\r
-        }\r
-\r
+        public bool NotEqualTo(Position2D rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Position2D.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private int ValueOfIndex(uint index)
+        {
+            int ret = (int)NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         /// <summary>
         /// x component.
         /// </summary>
-        public int X\r
-        {\r
-            set\r
-            {\r
-                NDalicPINVOKE.Vector2_X_set(swigCPtr, (float)value);\r
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            }\r
-            get\r
-            {\r
-                float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr);\r
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-                return (int)ret;\r
-            }\r
-        }\r
-\r
+        public int X
+        {
+            set
+            {
+                NDalicPINVOKE.Vector2_X_set(swigCPtr, (float)value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return (int)ret;
+            }
+        }
+
         /// <summary>
         /// y component.
         /// </summary>
-        public int Y\r
-        {\r
-            set\r
-            {\r
-                NDalicPINVOKE.Vector2_Y_set(swigCPtr, (float)value);\r
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-            }\r
-            get\r
-            {\r
-                float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr);\r
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
-                return (int)ret;\r
-            }\r
-        }\r
-\r
+        public int Y
+        {
+            set
+            {
+                NDalicPINVOKE.Vector2_Y_set(swigCPtr, (float)value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return (int)ret;
+            }
+        }
+
         /// <summary>
         /// Convert a position2D instance to a vector2 instance.
         /// </summary>
-        public static implicit operator Vector2(Position2D position2d)\r
-        {\r
-            return new Vector2((float)position2d.X, (float)position2d.Y);\r
-        }\r
-\r
+        public static implicit operator Vector2(Position2D position2d)
+        {
+            return new Vector2((float)position2d.X, (float)position2d.Y);
+        }
+
         /// <summary>
         /// Convert a vector2 instance to a position2D instance.
         /// </summary>
-        public static implicit operator Position2D(Vector2 vec)\r
-        {\r
-            return new Position2D((int)vec.X, (int)vec.Y);\r
-        }\r
-\r
+        public static implicit operator Position2D(Vector2 vec)
+        {
+            return new Position2D((int)vec.X, (int)vec.Y);
+        }
+
+        /// <summary>
+        /// Convert a Position2D instance to a Uint16Pair instance.
+        /// </summary>
+        public static implicit operator Uint16Pair(Position2D position2d)
+        {
+            return new Uint16Pair((uint)position2d.X, (uint)position2d.Y);
+        }
+
+        /// <summary>
+        /// Convert a Uint16Pair instance to a Position2D instance.
+        /// </summary>
+        public static implicit operator Position2D(Uint16Pair pair)
+        {
+            return new Position2D((int)pair.GetX(), (int)pair.GetY());
+        }
+
     }
 
 }
index 9e3b50c..13006b4 100755 (executable)
@@ -361,6 +361,25 @@ namespace Tizen.NUI
             return new Size2D((int)vec.X, (int)vec.Y);
         }
 
+        /// <summary>
+        /// Type cast operator, Size2D to Uint16Pair.
+        /// </summary>
+        /// <param name="size2d">Object of Size2D type</param>
+        public static implicit operator Uint16Pair(Size2D size2d)
+        {
+            return new Uint16Pair((uint)size2d.Width, (uint)size2d.Height);
+        }
+
+        /// <summary>
+        /// Type cast operator, Uint16Pair to Size2D type.
+        /// </summary>
+        /// <param name="pair">Object of Vector2 type</param>
+        public static implicit operator Size2D(Uint16Pair pair)
+        {
+            return new Size2D((int)pair.GetWidth(), (int)pair.GetWidth());
+        }
+
+
     }
 
 }