From da3356ba3e678f2941ed302036788659b6c84d53 Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Tue, 1 Aug 2017 10:17:59 +0900 Subject: [PATCH] Revert "[Tizen] Add obsolete attribute for deprecated apis, backward compatibility" This reverts commit 30ec710dcf0c47e92aebe726e0fbceb80c97353a. Change-Id: I9c6ad339af71168239436fb1915244ecbb2f02b8 --- src/Tizen.NUI/src/internal/ActivatedSignalType.cs | 6 +- .../src/internal/ConnectionTrackerInterface.cs | 6 +- src/Tizen.NUI/src/internal/ImfEventSignalType.cs | 6 +- src/Tizen.NUI/src/internal/ImfVoidSignalType.cs | 6 +- .../src/internal/SWIGTYPE_p_CallbackBase.cs | 6 +- .../src/internal/SWIGTYPE_p_Dali__CallbackBase.cs | 6 +- .../internal/SWIGTYPE_p_Dali__FunctorDelegate.cs | 6 +- src/Tizen.NUI/src/internal/SignalObserver.cs | 6 +- src/Tizen.NUI/src/internal/SlotObserver.cs | 6 +- src/Tizen.NUI/src/internal/StatusSignalType.cs | 6 +- src/Tizen.NUI/src/internal/Uint16Pair.cs | 5 +- src/Tizen.NUI/src/public/BaseComponents/View.cs | 28 +- src/Tizen.NUI/src/public/ImfManager.cs | 588 +++------------------ src/Tizen.NUI/src/public/Position2D.cs | 534 +++++++++---------- src/Tizen.NUI/src/public/Size2D.cs | 19 - 15 files changed, 350 insertions(+), 884 deletions(-) diff --git a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs index 8728e98..4e1c714 100755 --- a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs +++ b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs @@ -13,13 +13,11 @@ * limitations under the License. * */ -using System; -using System.Runtime.InteropServices; namespace Tizen.NUI { - [Obsolete("Please do not use! this will be deprecated")] - public class ActivatedSignalType : global::System.IDisposable + + internal class ActivatedSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs index 3505e46..35feff7 100755 --- a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs +++ b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs @@ -13,13 +13,11 @@ * limitations under the License. * */ -using System; -using System.Runtime.InteropServices; namespace Tizen.NUI { - [Obsolete("Please do not use! this will be internal")] - public class ConnectionTrackerInterface : SignalObserver + + internal class ConnectionTrackerInterface : SignalObserver { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ImfEventSignalType.cs b/src/Tizen.NUI/src/internal/ImfEventSignalType.cs index a2334ac..1ccbdc8 100755 --- a/src/Tizen.NUI/src/internal/ImfEventSignalType.cs +++ b/src/Tizen.NUI/src/internal/ImfEventSignalType.cs @@ -13,13 +13,11 @@ * limitations under the License. * */ -using System; -using System.Runtime.InteropServices; namespace Tizen.NUI { - [Obsolete("Please do not use! this will be deprecated")] - public class ImfEventSignalType : global::System.IDisposable + + internal class ImfEventSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs b/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs index ca597c1..549be57 100755 --- a/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs +++ b/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs @@ -13,13 +13,11 @@ * limitations under the License. * */ -using System; -using System.Runtime.InteropServices; namespace Tizen.NUI { - [Obsolete("Please do not use! this will be internal")] - public class ImfVoidSignalType : global::System.IDisposable + + internal class ImfVoidSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs index 9413739..0191095 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs @@ -7,13 +7,11 @@ // 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 { - [Obsolete("Please do not use! this will be internal")] - public class SWIGTYPE_p_CallbackBase + + internal class SWIGTYPE_p_CallbackBase { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs index 0030697..22ff2b9 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs @@ -7,13 +7,11 @@ // 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 { - [Obsolete("Please do not use! this will be internal")] - public class SWIGTYPE_p_Dali__CallbackBase + + internal class SWIGTYPE_p_Dali__CallbackBase { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs index 33d505a..1e123d8 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs @@ -7,13 +7,11 @@ // 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 { - [Obsolete("Please do not use! this will be internal")] - public class SWIGTYPE_p_Dali__FunctorDelegate + + internal class SWIGTYPE_p_Dali__FunctorDelegate { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SignalObserver.cs b/src/Tizen.NUI/src/internal/SignalObserver.cs index 2e98240..d1916fd 100755 --- a/src/Tizen.NUI/src/internal/SignalObserver.cs +++ b/src/Tizen.NUI/src/internal/SignalObserver.cs @@ -13,13 +13,11 @@ * limitations under the License. * */ -using System; -using System.Runtime.InteropServices; namespace Tizen.NUI { - [Obsolete("Please do not use! this will be internal")] - public class SignalObserver : global::System.IDisposable + + internal class SignalObserver : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/SlotObserver.cs b/src/Tizen.NUI/src/internal/SlotObserver.cs index 9b034fe..2c55bff 100755 --- a/src/Tizen.NUI/src/internal/SlotObserver.cs +++ b/src/Tizen.NUI/src/internal/SlotObserver.cs @@ -13,13 +13,11 @@ * limitations under the License. * */ -using System; -using System.Runtime.InteropServices; namespace Tizen.NUI { - [Obsolete("Please do not use! this will be internal")] - public class SlotObserver : global::System.IDisposable + + internal class SlotObserver : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/StatusSignalType.cs b/src/Tizen.NUI/src/internal/StatusSignalType.cs index 70c0c8f..4c9de84 100755 --- a/src/Tizen.NUI/src/internal/StatusSignalType.cs +++ b/src/Tizen.NUI/src/internal/StatusSignalType.cs @@ -13,13 +13,11 @@ * limitations under the License. * */ -using System; -using System.Runtime.InteropServices; namespace Tizen.NUI { - [Obsolete("Please do not use! this will be deprecated")] - public class StatusSignalType : global::System.IDisposable + + internal class StatusSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/Uint16Pair.cs b/src/Tizen.NUI/src/internal/Uint16Pair.cs index c2d201f..bd5c273 100755 --- a/src/Tizen.NUI/src/internal/Uint16Pair.cs +++ b/src/Tizen.NUI/src/internal/Uint16Pair.cs @@ -14,13 +14,10 @@ * */ -using System; - namespace Tizen.NUI { - [Obsolete("Please do not use! this will be deprecated")] - public class Uint16Pair : global::System.IDisposable + internal class Uint16Pair : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index d220a7e..d0ddfee 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -1853,13 +1853,7 @@ namespace Tizen.NUI.BaseComponents } } - /// - /// Returns the natural size of the view. - /// - /// - /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size. - /// - [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")] + [Obsolete("Please do not use! this will be internal property")] public Vector3 NaturalSize { get @@ -1872,24 +1866,6 @@ namespace Tizen.NUI.BaseComponents } /// - /// Returns the natural size (Size2D) of the view. - /// - /// - /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size. - /// - 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); - } - } - - /// /// Shows the View. /// /// @@ -3788,7 +3764,7 @@ namespace Tizen.NUI.BaseComponents } } - [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")] + [Obsolete("Please do not use! this will be deprecated")] public Size Size { get diff --git a/src/Tizen.NUI/src/public/ImfManager.cs b/src/Tizen.NUI/src/public/ImfManager.cs index 1706bab..9304124 100755 --- a/src/Tizen.NUI/src/public/ImfManager.cs +++ b/src/Tizen.NUI/src/public/ImfManager.cs @@ -25,14 +25,14 @@ namespace Tizen.NUI { private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal ImfManager(IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ImfManager_SWIGUpcast(cPtr), cMemoryOwn) + internal ImfManager(global::System.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, IntPtr.Zero) : obj.swigCPtr; + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.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 != IntPtr.Zero) + if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicManualPINVOKE.delete_ImfManager(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } base.Dispose(type); @@ -75,7 +75,7 @@ namespace Tizen.NUI private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; - internal ImfEventData(IntPtr cPtr, bool cMemoryOwn) + internal ImfEventData(global::System.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, IntPtr.Zero) : obj.swigCPtr; + 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) @@ -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 != IntPtr.Zero) + if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicManualPINVOKE.delete_ImfManager_ImfEventData(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; } - internal static ImfEventData GetImfEventDataFromPtr(IntPtr cPtr) + internal static ImfEventData GetImfEventDataFromPtr(global::System.IntPtr cPtr) { ImfEventData ret = new ImfEventData(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -185,25 +185,6 @@ namespace Tizen.NUI /// /// The pre-edit or commit string. /// - [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; - } - } - - /// - /// The pre-edit or commit string. - /// public string PredictiveString { set @@ -222,25 +203,6 @@ namespace Tizen.NUI /// /// The name of the event from the IMF. /// - [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; - } - } - - /// - /// The name of the event from the IMF. - /// public ImfManager.ImfEvent EventName { set @@ -259,25 +221,6 @@ namespace Tizen.NUI /// /// Start position from the current cursor position to start deleting characters. /// - [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; - } - } - - /// - /// Start position from the current cursor position to start deleting characters. - /// public int CursorOffset { set @@ -296,25 +239,6 @@ namespace Tizen.NUI /// /// Number of characters to delete from the cursorOffset. /// - [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; - } - } - - /// - /// Number of characters to delete from the cursorOffset. - /// public int NumberOfChars { set @@ -345,7 +269,7 @@ namespace Tizen.NUI return (IntPtr)swigCPtr; } - internal ImfCallbackData(IntPtr cPtr, bool cMemoryOwn) + internal ImfCallbackData(global::System.IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); @@ -353,7 +277,7 @@ namespace Tizen.NUI internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImfCallbackData obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + 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) @@ -412,20 +336,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 != IntPtr.Zero) + if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicManualPINVOKE.delete_ImfManager_ImfCallbackData(swigCPtr); } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } disposed = true; } - internal static ImfCallbackData GetImfCallbackDataFromPtr(IntPtr cPtr) + internal static ImfCallbackData GetImfCallbackDataFromPtr(global::System.IntPtr cPtr) { ImfCallbackData ret = new ImfCallbackData(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -455,25 +379,6 @@ namespace Tizen.NUI /// /// Current text string. /// - [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; - } - } - - /// - /// Current text string. - /// public string CurrentText { set @@ -492,25 +397,6 @@ namespace Tizen.NUI /// /// Current text string. /// - [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; - } - } - - /// - /// Current text string. - /// public int CursorPosition { set @@ -529,25 +415,6 @@ namespace Tizen.NUI /// /// If cursor position needs to be updated. /// - [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; - } - } - - /// - /// If cursor position needs to be updated. - /// public bool Update { set @@ -566,25 +433,6 @@ namespace Tizen.NUI /// /// Flag if preedit reset is required. /// - [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; - } - } - - /// - /// Flag if preedit reset is required. - /// public bool PreeditResetRequired { set @@ -860,7 +708,7 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal static ImfManager GetImfManagerFromPtr(IntPtr cPtr) + internal static ImfManager GetImfManagerFromPtr(global::System.IntPtr cPtr) { ImfManager ret = new ImfManager(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -870,7 +718,6 @@ namespace Tizen.NUI /// /// ImfManager activated event arguments. /// - [Obsolete("Please do not use! this will be deprecated")] public class ImfManagerActivatedEventArgs : EventArgs { public ImfManager ImfManager @@ -883,12 +730,12 @@ namespace Tizen.NUI [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data); private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback; + private event EventHandler _imfManagerActivatedEventHandler; /// - /// ImfManager activated event. + /// ImfManager activated. /// - [Obsolete("Please do not use! this will be deprecated")] public event EventHandler ImfManagerActivated { add @@ -924,66 +771,7 @@ namespace Tizen.NUI } } - /// - /// ImfManager activated event arguments. - /// - public class ActivatedEventArgs : EventArgs - { - public ImfManager ImfManager - { - get; - set; - } - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ActivatedEventCallbackType(IntPtr data); - private ActivatedEventCallbackType _activatedEventCallback; - private event EventHandler _activatedEventHandler; - - /// - /// ImfManager activated. - /// - public event EventHandler 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); - } - } - - /// - /// ImfManager activated signal. - /// - [Obsolete("Please do not use! this will be internal")] - public ActivatedSignalType ActivatedSignal() + internal ActivatedSignalType ActivatedSignal() { ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -993,7 +781,6 @@ namespace Tizen.NUI /// /// ImfManager event received event arguments. /// - [Obsolete("Please do not use! this will be deprecated")] public class ImfManagerEventReceivedEventArgs : EventArgs { public ImfManager ImfManager @@ -1001,17 +788,22 @@ namespace Tizen.NUI get; set; } + + public ImfEventData ImfEventData + { + get; + set; + } } - private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data); + private delegate global::System.IntPtr ImfManagerEventReceivedEventCallbackType(global::System.IntPtr imfManager, global::System.IntPtr imfEventData); private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback; - private event EventHandler _imfManagerEventReceivedEventHandler; + private event EventHandlerWithReturnType _imfManagerEventReceivedEventHandler; /// /// ImfManager event received. /// - [Obsolete("Please do not use! this will be deprecated")] - public event EventHandler ImfManagerEventReceived + public event EventHandlerWithReturnType ImfManagerEventReceived { add { @@ -1034,78 +826,18 @@ namespace Tizen.NUI } } - private void OnImfManagerEventReceived(global::System.IntPtr data) - { - ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs(); - - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); - - if (_imfManagerEventReceivedEventHandler != null) - { - _imfManagerEventReceivedEventHandler(this, e); - } - } - - /// - /// ImfManager event received event arguments. - /// - 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 _eventReceivedEventHandler; - - /// - /// ImfManager event received. - /// - public event EventHandlerWithReturnType 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) + private global::System.IntPtr OnImfManagerEventReceived(global::System.IntPtr imfManager, global::System.IntPtr imfEventData) { ImfCallbackData imfCallbackData = null; - EventReceivedEventArgs e = new EventReceivedEventArgs(); + ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs(); e.ImfManager = ImfManager.GetImfManagerFromPtr(imfManager); e.ImfEventData = ImfEventData.GetImfEventDataFromPtr(imfEventData); - if (_eventReceivedEventHandler != null) + if (_imfManagerEventReceivedEventHandler != null) { - imfCallbackData = _eventReceivedEventHandler(this, e); + imfCallbackData = _imfManagerEventReceivedEventHandler(this, e); } if (imfCallbackData != null) { @@ -1117,11 +849,7 @@ namespace Tizen.NUI } } - /// - /// ImfManager event received signal. - /// - [Obsolete("Please do not use! this will be internal")] - public ImfEventSignalType EventReceivedSignal() + internal ImfEventSignalType EventReceivedSignal() { ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1131,24 +859,22 @@ namespace Tizen.NUI /// /// ImfManager status changed event arguments. /// - [Obsolete("Please do not use! this will be deprecated")] public class ImfManagerStatusChangedEventArgs : EventArgs { - public ImfManager ImfManager + public bool StatusChanged { get; set; } } - private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data); + private delegate void ImfManagerStatusChangedEventCallbackType(bool statusChanged); private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback; - private event EventHandler _imfManagerStatusChangedEventHandler; + private event EventHandler _imfManagerStatusChangedEventHandler; /// /// ImfManager status changed. /// - [Obsolete("Please do not use! this will be deprecated")] public event EventHandler ImfManagerStatusChanged { add @@ -1172,11 +898,11 @@ namespace Tizen.NUI } } - private void OnImfManagerStatusChanged(global::System.IntPtr data) + private void OnImfManagerStatusChanged(bool statusChanged) { ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs(); - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); + e.StatusChanged = statusChanged; if (_imfManagerStatusChangedEventHandler != null) { @@ -1184,93 +910,21 @@ namespace Tizen.NUI } } - /// - /// ImfManager status changed event arguments. - /// - public class StatusChangedEventArgs : EventArgs - { - public bool StatusChanged - { - get; - set; - } - } - - private delegate void StatusChangedEventCallbackType(bool statusChanged); - private StatusChangedEventCallbackType _statusChangedEventCallback; - private event EventHandler _statusChangedEventHandler; - - /// - /// ImfManager status changed. - /// - public event EventHandler 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); - } - } - - /// - /// ImfManager status changed signal. - /// - [Obsolete("Please do not use! this will be internal")] - public StatusSignalType StatusChangedSignal() + internal StatusSignalType StatusChangedSignal() { StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - /// - /// ImfManager resized event arguments. - /// - [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 delegate void ImfManagerResizedEventCallbackType(); private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback; - private event EventHandler _imfManagerResizedEventHandler; + private event EventHandler _imfManagerResizedEventHandler; /// - /// ImfManager resized event. + /// ImfManager resized. /// - [Obsolete("Please do not use! this will be deprecated")] - public event EventHandler ImfManagerResized + public event EventHandler ImfManagerResized { add { @@ -1293,89 +947,29 @@ namespace Tizen.NUI } } - private void OnImfManagerResized(IntPtr data) + private void OnImfManagerResized() { - ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs(); - - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); - if (_imfManagerResizedEventHandler != null) { - _imfManagerResizedEventHandler(this, e); - } - } - - private delegate void ResizedEventCallbackType(); - private ResizedEventCallbackType _resizedEventCallback; - private event EventHandler _resizedEventHandler; - - /// - /// ImfManager resized. - /// - 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); + _imfManagerResizedEventHandler(this, null); } } - /// - /// ImfManager resized signal. - /// - [Obsolete("Please do not use! this will be internal")] - public ImfVoidSignalType ResizedSignal() + internal ImfVoidSignalType ResizedSignal() { ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - /// - /// ImfManager language changed event arguments. - /// - [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 delegate void ImfManagerLanguageChangedEventCallbackType(); private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback; - private event EventHandler _imfManagerLanguageChangedEventHandler; + private event EventHandler _imfManagerLanguageChangedEventHandler; /// - /// ImfManager language changed event. + /// ImfManager language changed. /// - [Obsolete("Please do not use! this will be deprecated")] - public event EventHandler ImfManagerLanguageChanged + public event EventHandler ImfManagerLanguageChanged { add { @@ -1398,61 +992,15 @@ namespace Tizen.NUI } } - private void OnImfManagerLanguageChanged(IntPtr data) + private void OnImfManagerLanguageChanged() { - ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs(); - - e.ImfManager = ImfManager.GetImfManagerFromPtr(data); - if (_imfManagerLanguageChangedEventHandler != null) { - _imfManagerLanguageChangedEventHandler(this, e); + _imfManagerLanguageChangedEventHandler(this, null); } } - private delegate void LanguageChangedEventCallbackType(); - private LanguageChangedEventCallbackType _languageChangedEventCallback; - private event EventHandler _languageChangedEventHandler; - - /// - /// ImfManager language changed. - /// - 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); - } - } - - /// - /// ImfManager language changed signal. - /// - [Obsolete("Please do not use! this will be internal")] - public ImfVoidSignalType LanguageChangedSignal() + internal ImfVoidSignalType LanguageChangedSignal() { ImfVoidSignalType ret = new ImfVoidSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1462,7 +1010,7 @@ namespace Tizen.NUI /// /// ImfManager keyboard type changed event arguments. /// - public class KeyboardTypeChangedEventArgs : EventArgs + public class ImfKeyboardTypeChangedEventArgs : EventArgs { public KeyboardType KeyboardType { @@ -1471,45 +1019,45 @@ namespace Tizen.NUI } } - private delegate void KeyboardTypeChangedEventCallbackType(KeyboardType type); - private KeyboardTypeChangedEventCallbackType _keyboardTypeChangedEventCallback; - private event EventHandler _keyboardTypeChangedEventHandler; + private delegate void ImfKeyboardTypeChangedEventCallbackType(KeyboardType type); + private ImfKeyboardTypeChangedEventCallbackType _imfKeyboardTypeChangedEventCallback; + private event EventHandler _imfKeyboardTypeChangedEventHandler; /// /// ImfManager keyboard type changed. /// - public event EventHandler KeyboardTypeChanged + public event EventHandler ImfKeyboardTypeChanged { add { - if (_keyboardTypeChangedEventHandler == null) + if (_imfKeyboardTypeChangedEventHandler == null) { - _keyboardTypeChangedEventCallback = OnKeyboardTypeChanged; - KeyboardTypeChangedSignal().Connect(_keyboardTypeChangedEventCallback); + _imfKeyboardTypeChangedEventCallback = OnImfKeyboardTypeChanged; + KeyboardTypeChangedSignal().Connect(_imfKeyboardTypeChangedEventCallback); } - _keyboardTypeChangedEventHandler += value; + _imfKeyboardTypeChangedEventHandler += value; } remove { - _keyboardTypeChangedEventHandler -= value; + _imfKeyboardTypeChangedEventHandler -= value; - if (_keyboardTypeChangedEventHandler == null && _keyboardTypeChangedEventCallback != null) + if (_imfKeyboardTypeChangedEventHandler == null && _imfKeyboardTypeChangedEventCallback != null) { - KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback); + KeyboardTypeChangedSignal().Disconnect(_imfKeyboardTypeChangedEventCallback); } } } - private void OnKeyboardTypeChanged(KeyboardType type) + private void OnImfKeyboardTypeChanged(KeyboardType type) { - KeyboardTypeChangedEventArgs e = new KeyboardTypeChangedEventArgs(); + ImfKeyboardTypeChangedEventArgs e = new ImfKeyboardTypeChangedEventArgs(); e.KeyboardType = type; - if (_keyboardTypeChangedEventHandler != null) + if (_imfKeyboardTypeChangedEventHandler != null) { - _keyboardTypeChangedEventHandler(this, e); + _imfKeyboardTypeChangedEventHandler(this, e); } } diff --git a/src/Tizen.NUI/src/public/Position2D.cs b/src/Tizen.NUI/src/public/Position2D.cs index 5faad48..c773814 100755 --- a/src/Tizen.NUI/src/public/Position2D.cs +++ b/src/Tizen.NUI/src/public/Position2D.cs @@ -15,364 +15,348 @@ * */ -namespace Tizen.NUI -{ - +namespace Tizen.NUI +{ + /// /// Position2D is a two dimensional vector. /// - 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; - } - + 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; + } + /// /// Addition operator. /// /// Vector to add /// Vector to add /// A vector containing the result of the addition - public static Position2D operator +(Position2D arg1, Position2D arg2) - { - return arg1.Add(arg2); - } - + public static Position2D operator +(Position2D arg1, Position2D arg2) + { + return arg1.Add(arg2); + } + /// /// Subtraction operator. /// /// Vector to subtract /// Vector to subtract /// A vector containing the result of the subtraction - public static Position2D operator -(Position2D arg1, Position2D arg2) - { - return arg1.Subtract(arg2); - } - + public static Position2D operator -(Position2D arg1, Position2D arg2) + { + return arg1.Subtract(arg2); + } + /// /// Unary negation operator. /// /// Vector to netate /// A vector containing the negation - public static Position2D operator -(Position2D arg1) - { - return arg1.Subtract(); - } - + public static Position2D operator -(Position2D arg1) + { + return arg1.Subtract(); + } + /// /// Multiplication operator. /// /// Vector to multiply /// Vector to multiply /// A vector containing the result of the multiplication - public static Position2D operator *(Position2D arg1, Position2D arg2) - { - return arg1.Multiply(arg2); - } - + public static Position2D operator *(Position2D arg1, Position2D arg2) + { + return arg1.Multiply(arg2); + } + /// /// Multiplication operator. /// /// Vector to multiply /// The int value to scale the vector /// A vector containing the result of the multiplication - public static Position2D operator *(Position2D arg1, int arg2) - { - return arg1.Multiply(arg2); - } - + public static Position2D operator *(Position2D arg1, int arg2) + { + return arg1.Multiply(arg2); + } + /// /// Division operator. /// /// Vector to divide /// Vector to divide /// A vector containing the result of the division - public static Position2D operator /(Position2D arg1, Position2D arg2) - { - return arg1.Divide(arg2); - } - + public static Position2D operator /(Position2D arg1, Position2D arg2) + { + return arg1.Divide(arg2); + } + /// /// Division operator. /// /// Vector to divide /// The int value to scale the vector by /// A vector containing the result of the division - public static Position2D operator /(Position2D arg1, int arg2) - { - return arg1.Divide(arg2); - } - + public static Position2D operator /(Position2D arg1, int arg2) + { + return arg1.Divide(arg2); + } + /// /// Const array subscript operator overload. Should be 0, or 1. /// /// Subscript index /// The float at the given index - 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; - } - + 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; + } + /// /// Constructor /// - public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - + public Position2D() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Constructor /// /// x component /// y component - 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(); - } - + 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(); + } + /// /// Constructor /// /// Position to create this vector from - 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; - } - + 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; + } + /// /// Compare if rhs is equal to. /// /// The vector to compare /// Returns true if the two vectors are equal, otherwise false - public bool EqualTo(Position2D rhs) - { - bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - + public bool EqualTo(Position2D rhs) + { + bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Position2D.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + /// /// Compare if rhs is not equal to. /// /// The vector to compare /// Returns true if the two vectors are not equal, otherwise false - 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; - } - + 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; + } + /// /// x component. /// - 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; - } - } - + 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; + } + } + /// /// y component. /// - 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; - } - } - + 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; + } + } + /// /// Convert a position2D instance to a vector2 instance. /// - public static implicit operator Vector2(Position2D position2d) - { - return new Vector2((float)position2d.X, (float)position2d.Y); - } - + public static implicit operator Vector2(Position2D position2d) + { + return new Vector2((float)position2d.X, (float)position2d.Y); + } + /// /// Convert a vector2 instance to a position2D instance. /// - public static implicit operator Position2D(Vector2 vec) - { - return new Position2D((int)vec.X, (int)vec.Y); - } - - /// - /// Convert a Position2D instance to a Uint16Pair instance. - /// - public static implicit operator Uint16Pair(Position2D position2d) - { - return new Uint16Pair((uint)position2d.X, (uint)position2d.Y); - } - - /// - /// Convert a Uint16Pair instance to a Position2D instance. - /// - public static implicit operator Position2D(Uint16Pair pair) - { - return new Position2D((int)pair.GetX(), (int)pair.GetY()); - } - + public static implicit operator Position2D(Vector2 vec) + { + return new Position2D((int)vec.X, (int)vec.Y); + } + } } diff --git a/src/Tizen.NUI/src/public/Size2D.cs b/src/Tizen.NUI/src/public/Size2D.cs index 13006b4..9e3b50c 100755 --- a/src/Tizen.NUI/src/public/Size2D.cs +++ b/src/Tizen.NUI/src/public/Size2D.cs @@ -361,25 +361,6 @@ namespace Tizen.NUI return new Size2D((int)vec.X, (int)vec.Y); } - /// - /// Type cast operator, Size2D to Uint16Pair. - /// - /// Object of Size2D type - public static implicit operator Uint16Pair(Size2D size2d) - { - return new Uint16Pair((uint)size2d.Width, (uint)size2d.Height); - } - - /// - /// Type cast operator, Uint16Pair to Size2D type. - /// - /// Object of Vector2 type - public static implicit operator Size2D(Uint16Pair pair) - { - return new Size2D((int)pair.GetWidth(), (int)pair.GetWidth()); - } - - } } -- 2.7.4