[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Button.cs
index 3ed6aa8..7332e41 100644 (file)
@@ -19,8 +19,10 @@ using System;
 namespace ElmSharp
 {
     /// <summary>
-    /// The Button is a widget works as a clickable input element to trigger events.
+    /// The Button is a widget that works as a clickable input element to trigger events.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class Button : Layout
     {
         private SmartEvent _clicked;
@@ -34,6 +36,8 @@ namespace ElmSharp
         /// <param name="parent">
         /// The EvasObject to which the new Button will be attached as a child.
         /// </param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Button(EvasObject parent) : base(parent)
         {
             _clicked = new SmartEvent(this, this.RealHandle, "clicked");
@@ -63,40 +67,50 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Clicked will be triggered when Button is clicked.
+        /// Clicked will be triggered when the button is clicked.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler Clicked;
 
         /// <summary>
-        /// Repeated will be triggered when Button is pressed without releasing it.
+        /// Repeated will be triggered when the button is pressed without releasing it.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler Repeated;
 
         /// <summary>
-        /// Pressed will be triggered when the Button is pressed.
+        /// Pressed will be triggered when the button is pressed.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler Pressed;
 
         /// <summary>
-        /// Released will be triggered when the Button is released after being pressed.
+        /// Released will be triggered when the button is released after being pressed.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler Released;
 
         /// <summary>
-        /// Sets or gets the autorepeat feature of a given Button.
+        /// Sets or gets the autorepeat feature of a given Bbutton.
         /// </summary>
         /// <remarks>
-        /// Autorepeat feature means autorepeat event generated when the button is kept pressed.
-        /// When set AutoRepeat to false, no autorepeat is performed and buttons will trigger Clicked event when they are clicked.
-        /// When set to true, keeping a button pressed continuously trigger Repeated event until the button is released.
-        /// The time it takes until it starts triggering Repeated is given by AutoRepeatInitialTime,
+        /// Autorepeat feature means the autorepeat event is generated when the button is kept pressed.
+        /// When set to false, no autorepeat is performed and the buttons will trigger the Clicked event when they are clicked.
+        /// When set to true, keeping a button pressed continuously will trigger the Repeated event until the button is released.
+        /// The time it takes until it starts triggering, repeated is given by AutoRepeatInitialTime,
         /// and the time between each new emission is given by AutoRepeatGapTimeout.
         /// </remarks>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool AutoRepeat
         {
             get
             {
-                return !Interop.Elementary.elm_button_autorepeat_get(RealHandle);
+                return Interop.Elementary.elm_button_autorepeat_get(RealHandle);
             }
             set
             {
@@ -107,6 +121,8 @@ namespace ElmSharp
         /// <summary>
         /// Sets or gets the initial timeout before the Repeat event is generated.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public double AutoRepeatInitialTime
         {
             get
@@ -122,6 +138,8 @@ namespace ElmSharp
         /// <summary>
         /// Sets or gets the interval between each generated Repeat event.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public double AutoRepeatGapTimeout
         {
             get
@@ -134,6 +152,11 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Deletes the object Color class.
+        /// </summary>
+        /// <param name="part">The Color class to be deleted.</param>
+        /// <since_tizen> preview </since_tizen>
         [Obsolete("DeleteColorClass is obsolete, please use EdjeObject.DeleteColorClass(string)")]
         public void DeleteColorClass(string part)
         {
@@ -141,8 +164,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Sets or gets the BackgroundColor of a given Button in normal and pressed status.
+        /// Sets or gets the BackgroundColor of a given button in the normal and pressed status.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override Color BackgroundColor
         {
             set
@@ -163,15 +188,16 @@ namespace ElmSharp
             }
         }
 
+        /// <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);
-            Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
-
-            RealHandle = Interop.Elementary.elm_button_add(handle);
-            Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
-
-            return handle;
+            return Interop.Elementary.elm_button_add(parent.Handle);
         }
     }
-}
\ No newline at end of file
+}