[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp.Wearable / ElmSharp.Wearable / CircleGenList.cs
index 1de98bd..6c4c975 100644 (file)
  */
 
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace ElmSharp.Wearable
 {
     /// <summary>
-    /// The Circle GenList Selector is a widget to display and handle genlist items by rotary event
-    /// Inherits <see cref="GenList"/>
+    /// The Circle GenList Selector is a widget to display and handle the genlist items by the Rotary event.
+    /// Inherits <see cref="GenList"/>.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class CircleGenList : GenList, IRotaryActionWidget
     {
         IntPtr _circleHandle;
         CircleSurface _surface;
 
         /// <summary>
-        /// Creates and initializes a new instance of the Circle GenList class
+        /// Creates and initializes a new instance of the Circle GenList class.
         /// </summary>
-        /// <param name="parent">The parent of new Circle GenList instance</param>
-        /// <param name="surface">The surface for drawing circle features for this widget.</param>
+        /// <param name="parent">The parent of the new Circle GenList instance.</param>
+        /// <param name="surface">The surface for drawing the circle features for this widget.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public CircleGenList(EvasObject parent, CircleSurface surface) : base()
         {
             Debug.Assert(parent == null || surface == null || parent.IsRealized);
@@ -41,18 +46,48 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Gets the handle for Circle Widget.
+        /// Creates and initializes a new instance of the Circle GenList class.
         /// </summary>
+        /// <param name="parent">The parent of the new Circle CircleGenList instance.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("It is not safe for guess circle surface from parent and create new surface by every new widget")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CircleGenList(EvasObject parent) : this(parent, CircleSurface.CreateCircleSurface(parent))
+        {
+            ((IRotaryActionWidget)this).Activate();
+        }
+
+        /// <summary>
+        /// Gets the handle for the Circle widget.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public virtual IntPtr CircleHandle => _circleHandle;
 
         /// <summary>
-        /// Gets the handle for Circle Surface used in this widget
+        /// Gets the handle for the circle surface used in this widget.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public virtual CircleSurface CircleSurface => _surface;
 
         /// <summary>
+        /// Sets or gets the disabled state of this widget.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("Use IsEnabled")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Disabled
+        {
+            get => !IsEnabled;
+            set => IsEnabled = !value;
+        }
+
+        /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override bool IsEnabled
         {
             get
@@ -66,8 +101,10 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Sets or gets the color of the scroll background
+        /// Sets or gets the color of the scroll background.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Color VerticalScrollBackgroundColor
         {
             get
@@ -83,8 +120,10 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Sets or gets the line width of the scroll background
+        /// Sets or gets the line width of the scroll background.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int VerticalScrollBackgroundLineWidth
         {
             get
@@ -98,8 +137,10 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Sets or gets the redius of the scroll background
+        /// Sets or gets the radius of the scroll background.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public double VerticalScrollBackgroundRadius
         {
             get
@@ -113,8 +154,10 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Sets or gets the color of the scroll bar
+        /// Sets or gets the color of the scrollbar.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Color VerticalScrollBarColor
         {
             get
@@ -130,8 +173,10 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Sets or gets the line width of the scroll bar
+        /// Sets or gets the line width of the scrollbar.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int VerticalScrollBarLineWidth
         {
             get
@@ -145,8 +190,10 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Sets or gets the redius of the scroll bar
+        /// Sets or gets the radius of the scrollbar.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public double VerticalScrollBarRadius
         {
             get
@@ -160,13 +207,15 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
-        /// Sets or gets the policy if the scroll bar is visible
+        /// Sets or gets the policy if the scrollbar is visible.
         /// </summary>
         /// <remarks>
-        /// ScrollBarVisiblePolicy.Auto means the vertical scrollbar is made visible if it is needed, and otherwise kept hidden.
+        /// ScrollBarVisiblePolicy.Auto means the vertical scrollbar is made visible if it is needed, or otherwise kept hidden.
         /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
         /// </remarks>
-        public ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
+        public new ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy
         {
             get
             {
@@ -185,12 +234,14 @@ namespace ElmSharp.Wearable
         /// <summary>
         /// Creates a widget handle.
         /// </summary>
-        /// <param name="parent">Parent EvasObject</param>
-        /// <returns>Handle IntPtr</returns>
+        /// <param name="parent">Parent EvasObject.</param>
+        /// <returns>Handle IntPtr.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         protected override IntPtr CreateHandle(EvasObject parent)
         {
             var handle = base.CreateHandle(parent);
-            _circleHandle = Interop.Eext.eext_circle_object_genlist_add(RealHandle == IntPtr.Zero ? Handle : RealHandle, CircleSurface.Handle);
+            _circleHandle = Interop.Eext.eext_circle_object_genlist_add(RealHandle == IntPtr.Zero ? handle : RealHandle, CircleSurface.Handle);
 
             return handle;
         }