[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / List.cs
old mode 100755 (executable)
new mode 100644 (file)
index 9a14f93..b27d594
@@ -20,14 +20,16 @@ using System.Collections.Generic;
 namespace ElmSharp
 {
     /// <summary>
-    /// Enumeration for setting list's resizing behavior, transverse axis scrolling and items cropping.
+    /// Enumeration for setting the list's resizing behavior, transverse axis scrolling, and items cropping.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public enum ListMode
     {
         /// <summary>
         /// The list won't set any of its size hints to inform how a possible container should resize it.
         /// Then, if it's not created as a "resize object", it might end with zeroed dimensions.
-        /// The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one won't be able to scroll it in that direction.
+        /// The list will respect the container's geometry, and if any of its items won't fit into its transverse axis, one won't be able to scroll it in that direction.
         /// </summary>
         Compress = 0,
         /// <summary>
@@ -35,13 +37,13 @@ namespace ElmSharp
         /// </summary>
         Scroll,
         /// <summary>
-        /// Sets a minimum size hint on the genlist object, so that containers may respect it (and resize itself to fit the child properly).
+        /// Sets a minimum size hint on the genlist object, so that the containers may respect it (and resize itself to fit the child properly).
         /// More specifically, a minimum size hint will be set for its transverse axis, so that the largest item in that direction fits well.
         /// This is naturally bound by the list object's maximum size hints, set externally.
         /// </summary>
         Limit,
         /// <summary>
-        /// Besides setting a minimum size on the transverse axis, just like on Limit, the list will set a minimum size on th longitudinal axis, trying to reserve space to all its children to be visible at a time.
+        /// Besides setting a minimum size on the transverse axis, just like on limit, the list will set a minimum size on the longitudinal axis, trying to reserve space to all its children to be visible at a time.
         /// This is naturally bound by the list object's maximum size hints, set externally.
         /// </summary>
         Expand
@@ -49,14 +51,18 @@ namespace ElmSharp
 
     /// <summary>
     /// It inherits System.EventArgs.
-    /// It contains Item which is <see cref="ListItem"/> type.
-    /// All events of List contain ListItemEventArgs as a parameter.
+    /// It contains an item which is <see cref="ListItem"/> type.
+    /// All the events of a list contain ListItemEventArgs as a parameter.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class ListItemEventArgs : EventArgs
     {
         /// <summary>
-        /// Gets or sets List item. The return type is <see cref="ListItem"/>.
+        /// Gets or sets the list item. The return type is <see cref="ListItem"/>.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ListItem Item { get; set; }
 
         internal static ListItemEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
@@ -68,11 +74,13 @@ namespace ElmSharp
 
     /// <summary>
     /// It inherits <see cref="Layout"/>.
-    /// The List is a widget that aims to display simple list item which has 2 icons and 1 text, and can be selected.
+    /// The List is a widget that aims to display a simple list item which has 2 icons, 1 text, and can be selected.
     /// For more robust lists, <see cref="GenList"/> should probably be used.
     /// </summary>
     /// <seealso cref="GenList"/>
     /// <seealso cref="GenGrid"/>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class List : Layout
     {
         HashSet<ListItem> _children = new HashSet<ListItem>();
@@ -85,7 +93,9 @@ namespace ElmSharp
         /// <summary>
         /// Creates and initializes a new instance of the List class.
         /// </summary>
-        /// <param name="parent">The parent is a given container which will be attached by List as a child. It's <see cref="EvasObject"/> type.</param>
+        /// <param name="parent">The parent is a given container, which will be attached by the list as a child. It's <see cref="EvasObject"/> type.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public List(EvasObject parent) : base(parent)
         {
             _selected = new SmartEvent<ListItemEventArgs>(this, this.RealHandle, "selected", ListItemEventArgs.CreateFromSmartEvent);
@@ -101,8 +111,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets or sets which mode to use for the list.
+        /// Gets or sets which mode to be used for the list.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ListMode Mode
         {
             get
@@ -118,6 +130,8 @@ namespace ElmSharp
         /// <summary>
         /// Gets the selected item.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ListItem SelectedItem
         {
             get
@@ -130,33 +144,45 @@ namespace ElmSharp
         /// <summary>
         /// ItemSelected is raised when a new list item is selected.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler<ListItemEventArgs> ItemSelected;
 
         /// <summary>
-        /// ItemUnselected is raised when the list item is Unselected.
+        /// ItemUnselected is raised when a list item is Unselected.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler<ListItemEventArgs> ItemUnselected;
 
         /// <summary>
-        /// ItemDoubleClicked is raised when a new list item is double clicked.
+        /// ItemDoubleClicked is raised when a new list item is double-clicked.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler<ListItemEventArgs> ItemDoubleClicked;
 
         /// <summary>
-        /// ItemLongPressed is raised when a list item is pressed for a certain amount of time. By default it's 1 second.
+        /// ItemLongPressed is raised when a list item is pressed for a certain amount of time. By default, it's 1 second.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler<ListItemEventArgs> ItemLongPressed;
 
         /// <summary>
-        /// ItemActivated is raised when a new list item is double clicked or pressed (enter|return|spacebar).
+        /// ItemActivated is raised when a new list item is double-clicked or pressed (enter|return|spacebar).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler<ListItemEventArgs> ItemActivated;
 
         /// <summary>
         /// Starts the list.
-        /// Call before running <see cref="EvasObject.Show"/> on the list object.
+        /// Called before running <see cref="EvasObject.Show"/> on the list object.
         /// If not called, it won't display the list properly.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void Update()
         {
             Interop.Elementary.elm_list_go(RealHandle);
@@ -168,6 +194,8 @@ namespace ElmSharp
         /// <param name="label">The text for the item.</param>
         /// <returns>Return a new added list item that contains a text.</returns>
         /// <seealso cref="ListItem"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ListItem Append(string label)
         {
             return Append(label, null, null);
@@ -181,9 +209,11 @@ namespace ElmSharp
         /// <param name="rightIcon">The right icon for the item.</param>
         /// <returns>Return a new added list item that contains a text and 2 icons.</returns>
         /// <seealso cref="ListItem"/>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ListItem Append(string label, EvasObject leftIcon, EvasObject rightIcon)
         {
-            ListItem item = new ListItem(label, leftIcon, rightIcon);
+            ListItem item = new ListItem(label, leftIcon, rightIcon, this);
             item.Handle = Interop.Elementary.elm_list_item_append(RealHandle, label, leftIcon, rightIcon, null, (IntPtr)item.Id);
             AddInternal(item);
             return item;
@@ -194,6 +224,8 @@ namespace ElmSharp
         /// </summary>
         /// <param name="label">The text for the item.</param>
         /// <returns>Return a new added list item that contains a text.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ListItem Prepend(string label)
         {
             return Prepend(label, null, null);
@@ -206,18 +238,22 @@ namespace ElmSharp
         /// <param name="leftIcon">The left icon for the item.</param>
         /// <param name="rigthIcon">The right icon for the item.</param>
         /// <returns>Return a new added list item that contains a text and 2 icons.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ListItem Prepend(string label, EvasObject leftIcon, EvasObject rigthIcon)
         {
-            ListItem item = new ListItem(label, leftIcon, rigthIcon);
+            ListItem item = new ListItem(label, leftIcon, rigthIcon, this);
             item.Handle = Interop.Elementary.elm_list_item_prepend(RealHandle, label, leftIcon, rigthIcon, null, (IntPtr)item.Id);
             AddInternal(item);
             return item;
         }
 
         /// <summary>
-        /// Removes all items from a given list widget.
+        /// Removes all the items from a given list widget.
         /// To delete just one item, use <see cref="ItemObject.Delete"/>.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void Clear()
         {
             Interop.Elementary.elm_list_clear(RealHandle);
@@ -228,6 +264,13 @@ namespace ElmSharp
             _children.Clear();
         }
 
+        /// <summary>
+        /// Creates a widget handle.
+        /// </summary>
+        /// <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)
         {
             IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);