From b2b85869d1a4ad2fe0fd31fbf0ad6764d011b6eb Mon Sep 17 00:00:00 2001 From: Feng Jin Date: Mon, 18 Dec 2017 15:54:19 +0800 Subject: [PATCH] [NUI]Remove some unused APIs. Change-Id: Ida75bc6e95408752b2f6a706a557a6a1221ee8e7 Signed-off-by: Feng Jin --- src/Tizen.NUI/src/public/FocusManager.cs | 66 ---------------------- src/Tizen.NUI/src/public/ImfManager.cs | 59 -------------------- src/Tizen.NUI/src/public/StyleManager.cs | 45 --------------- src/Tizen.NUI/src/public/TTSPlayer.cs | 46 ---------------- src/Tizen.NUI/src/public/VisualFactory.cs | 41 -------------- src/Tizen.NUI/src/public/Window.cs | 91 ------------------------------- 6 files changed, 348 deletions(-) diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs index d1d57b7..2794627 100755 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -43,72 +43,6 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// - /// To make the FocusManager instance be disposed. - /// - /// Please DO NOT use! This will be deprecated! - /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required. - /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed. - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (_focusedViewEnterKeyEventCallback2 != null) - { - FocusedViewEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback2); - } - - if (_focusedViewEnterKeyEventCallback != null) - { - FocusedViewEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback); - } - - if (_focusGroupChangedEventCallback != null) - { - FocusGroupChangedSignal().Disconnect(_focusGroupChangedEventCallback); - } - - if (_focusChangedEventCallback != null) - { - FocusChangedSignal().Disconnect(_focusChangedEventCallback); - } - - if (_preFocusChangeCallback != null) - { - PreFocusChangeSignal().Disconnect(_preFocusChangeCallback); - } - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_FocusManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - /// /// Event arguments that passed via the PreFocusChange signal. /// diff --git a/src/Tizen.NUI/src/public/ImfManager.cs b/src/Tizen.NUI/src/public/ImfManager.cs index 3339548..19cdedf 100755 --- a/src/Tizen.NUI/src/public/ImfManager.cs +++ b/src/Tizen.NUI/src/public/ImfManager.cs @@ -56,53 +56,6 @@ namespace Tizen.NUI } /// - /// Dispose - /// - /// Dispose Type - /// 3 - /// Please DO NOT use! This will be deprecated! - /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required. - /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed. - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (_keyboardTypeChangedEventCallback != null) - { - KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback); - } - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero); - } - - base.Dispose(type); - } - - /// /// This structure is used to pass on data from the IMF regarding predictive text. /// /// 3 @@ -543,18 +496,6 @@ namespace Tizen.NUI } /// - /// Destroy the context of the IMF.
- ///
- /// 4 - /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()! - [Obsolete("Please do not use! This will be deprecated! Please use ImfManager.Instance.DestroyContext() instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public void Finalize() - { - DestroyContext(); - } - - /// /// Retrieves a handle to the instance of the ImfManager. /// /// A handle to the ImfManager. diff --git a/src/Tizen.NUI/src/public/StyleManager.cs b/src/Tizen.NUI/src/public/StyleManager.cs index 90faf98..c88d884 100755 --- a/src/Tizen.NUI/src/public/StyleManager.cs +++ b/src/Tizen.NUI/src/public/StyleManager.cs @@ -61,51 +61,6 @@ namespace Tizen.NUI } /// - /// Dispose. - /// - /// Please DO NOT use! This will be deprecated! - /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required. - /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed. - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (_styleManagerStyleChangedCallbackDelegate != null) - { - StyleChangedSignal().Disconnect(_styleManagerStyleChangedCallbackDelegate); - } - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_StyleManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - /// /// Style changed event arguments. /// /// 3 diff --git a/src/Tizen.NUI/src/public/TTSPlayer.cs b/src/Tizen.NUI/src/public/TTSPlayer.cs index 42ca3bb..81b49d2 100755 --- a/src/Tizen.NUI/src/public/TTSPlayer.cs +++ b/src/Tizen.NUI/src/public/TTSPlayer.cs @@ -55,52 +55,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// The dispose type - /// 3 - /// Please DO NOT use! This will be deprecated! - /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required. - /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed. - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (_stateChangedEventCallback != null) - { - StateChangedSignal().Disconnect(_stateChangedEventCallback); - } - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_TtsPlayer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - internal TTSPlayer() : this(NDalicManualPINVOKE.new_TtsPlayer__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/src/Tizen.NUI/src/public/VisualFactory.cs b/src/Tizen.NUI/src/public/VisualFactory.cs index e965dd6..0c1e066 100755 --- a/src/Tizen.NUI/src/public/VisualFactory.cs +++ b/src/Tizen.NUI/src/public/VisualFactory.cs @@ -40,47 +40,6 @@ namespace Tizen.NUI } /// - /// Dispose. - /// - /// The dispose type - /// 3 - /// Please DO NOT use! This will be deprecated! - /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required. - /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed. - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_VisualFactory(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - /// /// Please do not use! this will be deprecated, please use VisualFactory.Instance instead. /// /// 3 diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index e21644c..b3cfbad 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -57,97 +57,6 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// - /// To make the window instance be disposed. - /// - /// Please DO NOT use! This will be deprecated! - /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required. - /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed. - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (_windowFocusChangedEventCallback != null) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback); - } - - if (_stageTouchCallbackDelegate != null) - { - TouchSignal().Disconnect(_stageTouchCallbackDelegate); - } - - if (_stageWheelCallbackDelegate != null) - { - WheelEventSignal().Disconnect(_stageWheelCallbackDelegate); - } - - if (_stageKeyCallbackDelegate != null) - { - KeyEventSignal().Disconnect(_stageKeyCallbackDelegate); - } - - if (_stageEventProcessingFinishedEventCallbackDelegate != null) - { - EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate); - } - - if (_stageContextLostEventCallbackDelegate != null) - { - ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate); - } - - if (_stageContextRegainedEventCallbackDelegate != null) - { - this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate); - } - - if (_stageSceneCreatedEventCallbackDelegate != null) - { - SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate); - } - - if (_windowResizedEventCallback != null) - { - ResizedSignal().Disconnect(_windowResizedEventCallback); - } - - if (_windowFocusChangedEventCallback2 != null) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2); - } - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Window(swigCPtr); - NDalicPINVOKE.delete_Stage(stageCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - internal static Window GetCurrent() { Window ret = new Window(NDalicPINVOKE.Stage_GetCurrent(), true); -- 2.7.4