From d88bc0ac5931a1cf2450c60ba1fbec75b6039954 Mon Sep 17 00:00:00 2001 From: huiyu Date: Mon, 28 Dec 2020 11:23:29 +0900 Subject: [PATCH] [NUI] Modify acr apis Signed-off-by: huiyu --- src/Tizen.NUI/src/internal/Disposable.cs | 11 ++-- src/Tizen.NUI/src/public/BaseHandle.cs | 12 ++++ src/Tizen.NUI/src/public/CustomViewRegistry.cs | 7 +++ src/Tizen.NUI/src/public/InputMethodContext.cs | 2 +- src/Tizen.NUI/src/public/KeyValue.cs | 59 ++++++++++++++++++++ .../src/public/Layouting/LayoutTransition.cs | 65 ++++++++++++++++++++++ .../src/public/Layouting/MeasureSpecification.cs | 44 +++++++++++++++ 7 files changed, 195 insertions(+), 5 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Disposable.cs b/src/Tizen.NUI/src/internal/Disposable.cs index eebd3b8..5a46a6b 100755 --- a/src/Tizen.NUI/src/internal/Disposable.cs +++ b/src/Tizen.NUI/src/internal/Disposable.cs @@ -177,9 +177,12 @@ namespace Tizen.NUI } } - internal bool SwigCMemOwn - { - get => swigCMemOwn; - } + internal bool SwigCMemOwn => swigCMemOwn; + + /// + /// A Flag to check if it is already disposed. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal bool Disposed => disposed; } } diff --git a/src/Tizen.NUI/src/public/BaseHandle.cs b/src/Tizen.NUI/src/public/BaseHandle.cs index 009bc5a..37af440 100755 --- a/src/Tizen.NUI/src/public/BaseHandle.cs +++ b/src/Tizen.NUI/src/public/BaseHandle.cs @@ -559,6 +559,18 @@ namespace Tizen.NUI swigCPtr = value; } } + + /// + /// swigCMemOwn + /// + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal bool SwigCMemOwn => swigCMemOwn; + + /// + /// A flag to check if it is already disposed. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal bool Disposed => disposed; } } diff --git a/src/Tizen.NUI/src/public/CustomViewRegistry.cs b/src/Tizen.NUI/src/public/CustomViewRegistry.cs index 6dadef9..b2b87a5 100755 --- a/src/Tizen.NUI/src/public/CustomViewRegistry.cs +++ b/src/Tizen.NUI/src/public/CustomViewRegistry.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.InteropServices; using System.Collections.Generic; using Tizen.NUI.BaseComponents; +using System.ComponentModel; namespace Tizen.NUI { @@ -98,6 +99,12 @@ namespace Tizen.NUI Default, // Read Writable, non-animatable property, event thread only // Animatable // Animatable property, Currently disabled, UK } + + /// + /// ScriptableType. Read Writable, non-animatable property, event thread only. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public ScriptableType Type => type; } /// diff --git a/src/Tizen.NUI/src/public/InputMethodContext.cs b/src/Tizen.NUI/src/public/InputMethodContext.cs index f7d5177..3ab02ba 100755 --- a/src/Tizen.NUI/src/public/InputMethodContext.cs +++ b/src/Tizen.NUI/src/public/InputMethodContext.cs @@ -944,7 +944,7 @@ namespace Tizen.NUI /// The state if it owns memory /// /// 5 - //ToDo : raise ACR as [Obsolete("This has been deprecated in API9 and will be removed in API11. Please use swigCMemOwn which is declared in parent class")] + [Obsolete("Deprecated in API9, Will be removed in API11, Please use SwigCMemOwn which is declared in parent class")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1051:Do not declare visible instance fields", Justification = "")] protected bool swigCMemOwn; private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/public/KeyValue.cs b/src/Tizen.NUI/src/public/KeyValue.cs index 77497d2..cf0e8c8 100755 --- a/src/Tizen.NUI/src/public/KeyValue.cs +++ b/src/Tizen.NUI/src/public/KeyValue.cs @@ -17,6 +17,7 @@ using System; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using Tizen.NUI.Binding; namespace Tizen.NUI @@ -30,16 +31,25 @@ namespace Tizen.NUI /// /// Int key. /// + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use IntegerKey instead.")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public int? KeyInt = null; /// /// String key. /// + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use StringKey instead.")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public string KeyString = null; /// /// True value. /// + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use PropertyValue instead.")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public PropertyValue TrueValue = null; private string _key = null; @@ -122,6 +132,55 @@ namespace Tizen.NUI } /// + /// Int key. + /// + /// When deleting the field, change it to prperty. + [EditorBrowsable(EditorBrowsableState.Never)] + public int? IntegerKey + { + get + { + return KeyInt; + } + set + { + KeyInt = value; + } + } + + /// + /// String key. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public string StringKey + { + get + { + return KeyString; + } + set + { + KeyString = value; + } + } + + /// + /// Property value. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public PropertyValue PropertyValue + { + get + { + return TrueValue; + } + set + { + TrueValue = value; + } + } + + /// /// IntergerValue property. /// public int IntergerValue diff --git a/src/Tizen.NUI/src/public/Layouting/LayoutTransition.cs b/src/Tizen.NUI/src/public/Layouting/LayoutTransition.cs index f865848..242bc4e 100755 --- a/src/Tizen.NUI/src/public/Layouting/LayoutTransition.cs +++ b/src/Tizen.NUI/src/public/Layouting/LayoutTransition.cs @@ -18,6 +18,7 @@ using System.Collections.Generic; using System; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; namespace Tizen.NUI { @@ -135,18 +136,82 @@ namespace Tizen.NUI /// Get, Set the time transition should execute for . Milliseconds. /// /// 6 + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use GetDuration, SetDuration instead!")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public int Duration; + /// /// Get, Set the delay before the transition executes. Milliseconds. /// /// 6 + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use GetDelay, SetDelay instead!")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public int Delay; + /// /// Get, Set the function to alter the transition path over time. /// /// 6 + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use GetAlphaFunction, SetAlphaFunction instead!")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public AlphaFunction AlphaFunction; + /// + /// Set the time transition should execute for . Milliseconds. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetDuration(int duration) + { + Duration = duration; + } + + /// + /// Get the time transition should execute for . Milliseconds. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public int GetDuration() + { + return Duration; + } + + /// + /// Set the delay before the transition executes. Milliseconds. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetDelay(int delay) + { + Delay = delay; + } + + /// + /// Get the delay before the transition executes. Milliseconds. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public int GetDelay() + { + return Delay; + } + + /// + /// Set the function to alter the transition path over time. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetAlphaFunction(AlphaFunction alphaFunction) + { + AlphaFunction = alphaFunction; + } + + /// + /// Get the function to alter the transition path over time. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public AlphaFunction GetAlphaFunction() + { + return AlphaFunction; + } [EditorBrowsable(EditorBrowsableState.Never)] protected virtual void Dispose(bool disposing) diff --git a/src/Tizen.NUI/src/public/Layouting/MeasureSpecification.cs b/src/Tizen.NUI/src/public/Layouting/MeasureSpecification.cs index c67a17c..f624fa0 100755 --- a/src/Tizen.NUI/src/public/Layouting/MeasureSpecification.cs +++ b/src/Tizen.NUI/src/public/Layouting/MeasureSpecification.cs @@ -15,7 +15,9 @@ * */ +using System; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using Tizen.NUI.BaseComponents; namespace Tizen.NUI @@ -30,12 +32,18 @@ namespace Tizen.NUI /// MeasureSpecification Size value. /// /// 6 + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use GetSize,SetSize instead!")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public LayoutLength Size; /// /// MeasureSpecification Mode. /// /// 6 + /// When deleting the field, change it to prperty. + [Obsolete("Deprecated in API9, Will be removed in API11. Please use GetMode,SetMode instead!")] + [SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")] public MeasureSpecification.ModeType Mode; /// @@ -71,5 +79,41 @@ namespace Tizen.NUI /// AtMost } + + /// + /// Set MeasureSpecification Size value. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetSize(LayoutLength size) + { + Size = size; + } + + /// + /// Get MeasureSpecification Size value. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public LayoutLength GetSize() + { + return Size; + } + + /// + /// Set MeasureSpecification Mode. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetMode(MeasureSpecification.ModeType mode) + { + Mode = mode; + } + + /// + /// Get MeasureSpecification Mode. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public MeasureSpecification.ModeType GetMode() + { + return Mode; + } } } -- 2.7.4