[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / ContextPopup.cs
old mode 100755 (executable)
new mode 100644 (file)
index 06e9dce..51c61f5
@@ -20,38 +20,40 @@ using System.Collections.Generic;
 namespace ElmSharp
 {
     /// <summary>
-    /// Enumeration of ContextPopup direction type.
+    /// Enumeration for the ContextPopup direction types.
     /// </summary>
     /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public enum ContextPopupDirection
     {
         /// <summary>
-        /// ContextPopup show appear below clicked area
+        /// The ContextPopup appears below the clicked area.
         /// /// </summary>
         Down,
         /// <summary>
-        /// ContextPopup show appear to the right of the clicked area
+        /// The ContextPopup appears to the right of the clicked area.
         /// </summary>
         Right,
         /// <summary>
-        /// ContextPopup show appear to the left of the clicked area
+        /// The ContextPopup appears to the left of the clicked area.
         /// </summary>
         Left,
         /// <summary>
-        /// ContextPopup show appear above the clicked area
+        /// The ContextPopup appears above the clicked area.
         /// </summary>
         Up,
         /// <summary>
-        /// ContextPopup does not determine it's direction yet
+        /// The ContextPopup does not determine it's direction yet.
         /// </summary>
         Unknown
     }
 
     /// <summary>
     /// It inherits <see cref="Layout"/>.
-    /// The ContextPopup is a widget that when it shown, pops up a list of items.
+    /// The ContextPopup is a widget that when shown, pops up a list of items.
     /// </summary>
     /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class ContextPopup : Layout
     {
         HashSet<ContextPopupItem> _children = new HashSet<ContextPopupItem>();
@@ -61,9 +63,10 @@ namespace ElmSharp
         /// <summary>
         /// Creates and initializes a new instance of the ContextPopup class.
         /// </summary>
-        /// <param name="parent">The parent is a given container which will be attached by ContextPopup
-        /// as a child.It's <see cref="EvasObject"/> type.</param>
+        /// <param name="parent">The parent is a given container, which will be attached by ContextPopup
+        /// as a child. It's <see cref="EvasObject"/> type.</param>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ContextPopup(EvasObject parent) : base(parent)
         {
             _dismissed = new SmartEvent(this, this.RealHandle, "dismissed");
@@ -82,18 +85,20 @@ namespace ElmSharp
         /// Dismissed is raised when the ContextPopup item is dismissed.
         /// </summary>
         /// <remarks>
-        /// Outside of ContextPopup was clicked or it's parent area is changed or the language is changed. and then ContextPopup is dismissed.
+        /// Outside of ContextPopup is clicked or it's parent area is changed or the language is changed, and then ContextPopup is dismissed.
         /// </remarks>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler Dismissed;
 
         /// <summary>
         /// Gets the current direction of a ContextPopup.
         /// </summary>
         /// <remarks>
-        /// Once the ContextPopup showed up, the direction would be determined.
+        /// Once the ContextPopup shows up, the direction would be determined.
         /// </remarks>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ContextPopupDirection Direction
         {
             get
@@ -103,10 +108,11 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets or sets the value of current ContextPopup object's orientation.
-        /// True for horizontal mode, False for vertical mode (or errors)
+        /// Gets or sets the value of the current ContextPopup object's orientation.
+        /// True for horizontal mode, False for vertical mode (or errors).
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool IsHorizontal
         {
             get
@@ -120,13 +126,14 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets or sets whether ContextPopup hide automatically
-        /// or not when parent of ContextPopup is resized.
+        /// Gets or sets whether the ContextPopup hides automatically
+        /// or not when the parent of the ContextPopup is resized.
         /// </summary>
         /// <remarks>
         /// Default value of AutoHide is False.
         /// </remarks>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool AutoHide
         {
             get
@@ -140,9 +147,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Clears all items in the given ContextPopup object.
+        /// Clears all the items in a given ContextPopup object.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void Clear()
         {
             Interop.Elementary.elm_ctxpopup_clear(Handle);
@@ -151,11 +159,12 @@ namespace ElmSharp
         /// <summary>
         /// Sets the direction priority of a ContextPopup.
         /// </summary>
-        /// <param name="first">1st priority of direction </param>
-        /// <param name="second">2nd priority of direction </param>
-        /// <param name="third">3th priority of direction </param>
-        /// <param name="fourth">4th priority of direction</param>
+        /// <param name="first">1st priority of the direction.</param>
+        /// <param name="second">2nd priority of the direction.</param>
+        /// <param name="third">3th priority of the direction.</param>
+        /// <param name="fourth">4th priority of the direction.</param>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void SetDirectionPriorty(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth)
         {
             Interop.Elementary.elm_ctxpopup_direction_priority_set(RealHandle, (int)first, (int)second, (int)third, (int)fourth);
@@ -164,11 +173,12 @@ namespace ElmSharp
         /// <summary>
         /// Gets the direction priority of a ContextPopup.
         /// </summary>
-        /// <param name="first">1st priority of direction to be returned</param>
-        /// <param name="second">2nd priority of direction to be returned</param>
-        /// <param name="third">2nd priority of direction to be returned </param>
-        /// <param name="fourth">4th priority of direction to be returned</param>
+        /// <param name="first">1st priority of the direction to be returned.</param>
+        /// <param name="second">2nd priority of the direction to be returned.</param>
+        /// <param name="third">2nd priority of the direction to be returned.</param>
+        /// <param name="fourth">4th priority of the direction to be returned.</param>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void GetDirectionPriority(out ContextPopupDirection first, out ContextPopupDirection second, out ContextPopupDirection third, out ContextPopupDirection fourth)
         {
             int firstOut, secondOut, thirdOut, fourthOut;
@@ -180,59 +190,66 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Adds a new item to a ContextPopup object with label.
+        /// Adds a new item to a ContextPopup object with the label.
         /// </summary>
-        /// <param name="label">The Label of the new item</param>
+        /// <param name="label">Label of the new item.</param>
         /// <returns>
-        /// A ContextPopupItem added or NULL, on errors
+        /// A ContextPopupItem added, or null on errors.
         /// </returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ContextPopupItem Append(string label)
         {
             return Append(label, null);
         }
 
         /// <summary>
-        /// Adds a new item to a ContextPopup object with label and icon.
+        /// Adds a new item to a ContextPopup object with the label and icon.
         /// </summary>
-        /// <param name="label">The Label of the new item</param>
-        /// <param name="icon">Icon to be set on new item</param>
-        /// <returns>A ContextPopupItem added or NULL, on errors</returns>
+        /// <param name="label">Label of the new item.</param>
+        /// <param name="icon">Icon to be set on the new item.</param>
+        /// <returns>A ContextPopupItem added, or null on errors.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public ContextPopupItem Append(string label, EvasObject icon)
         {
-            ContextPopupItem item = new ContextPopupItem(label, icon);
+            ContextPopupItem item = new ContextPopupItem(label, icon, this);
             item.Handle = Interop.Elementary.elm_ctxpopup_item_append(RealHandle, label, icon, _onSelected, (IntPtr)item.Id);
             AddInternal(item);
             return item;
         }
 
         /// <summary>
-        /// Dismiss a ContextPopup object. The ContextPopup will be hidden and the "clicked" signal will be emitted.
+        /// Dismisses a ContextPopup object. The ContextPopup will be hidden and the "clicked" signal will be emitted.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void Dismiss()
         {
             Interop.Elementary.elm_ctxpopup_dismiss(RealHandle);
         }
 
         /// <summary>
-        /// Gets the possibility that the direction would be available
+        /// Gets the possibility that the direction would be available.
         /// </summary>
-        /// <param name="direction">A direction user wants to check</param>
+        /// <param name="direction">A direction that the user wants to check.</param>
         /// <returns>
-        /// Get false if you cannot put it in the direction. Gets true if it's possible.
+        /// Get false if you cannot put it in the direction. Get true if it's possible.
         /// </returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
+        /// [Obsolete("IsAvailableDirection is obsolete as of API6 and is no longer supported.")]
         public bool IsAvailableDirection(ContextPopupDirection direction)
         {
-            return Interop.Elementary.elm_ctxpopup_direction_available_get(RealHandle, (int)direction);
+            Console.WriteLine("ContextPopup.IsAvailableDirection is obsolete as of API6 and is no longer supported.");
+            return false;
         }
 
         /// <summary>
-        /// Gets Alpha of a default Color Class.
+        /// Gets the Alpha of a default Color class.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override int Opacity
         {
             get
@@ -249,9 +266,10 @@ namespace ElmSharp
         /// <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)
         {
             return Interop.Elementary.elm_ctxpopup_add(parent.Handle);