[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Layout.cs
index af5ab10..ad087aa 100644 (file)
@@ -19,10 +19,11 @@ using System;
 namespace ElmSharp
 {
     /// <summary>
-    /// This is a container widget that takes a standard Edje design file and wraps it very thinly in a widget.
-    /// Inherits Widget
+    /// This is a container widget that takes a standard edje design file and wraps it very thinly in a widget.
+    /// Inherits Widget.
     /// </summary>
     /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public class Layout : Container
     {
         SmartEvent _languageChanged;
@@ -31,18 +32,20 @@ namespace ElmSharp
         IntPtr _edjeHandle;
 
         /// <summary>
-        /// Creates and initializes a new instance of Layout class.
+        /// Creates and initializes a new instance of the Layout class.
         /// </summary>
-        /// <param name="parent">The parent is a given container which will be attached by Layout 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 layout as a child. It's <see cref="EvasObject"/> type.</param>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Layout(EvasObject parent) : base(parent)
         {
         }
 
         /// <summary>
-        /// Creates and initializes a new instance of Layout class.
+        /// Creates and initializes a new instance of the Layout class.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         protected Layout() : base()
         {
         }
@@ -51,18 +54,21 @@ namespace ElmSharp
         /// LanguageChanged will be triggered when the program's language is changed.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler LanguageChanged;
 
         /// <summary>
         /// ThemeChanged will be triggered when the theme is changed.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public event EventHandler ThemeChanged;
 
         /// <summary>
         /// Gets the edje layout.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public EdjeObject EdjeObject
         {
             get
@@ -74,9 +80,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets or sets accessibility state of texblock(text) parts in the layout object.
+        /// Gets or sets the accessibility state of texblock (text) parts in a layout object.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool TextBlockAccessibility
         {
             get
@@ -91,11 +98,12 @@ namespace ElmSharp
 
         /// <summary>
         /// Freezes the Elementary layout object.
-        /// This function puts all changes on hold.
+        /// This function puts all the changes on hold.
         /// Successive freezes will nest, requiring an equal number of thaws.
         /// </summary>
-        /// <returns>The frozen state or 0 if the object is not frozen or on error.</returns>
+        /// <returns>The frozen state, or 0 if the object is not frozen or on error.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Freeze()
         {
             return Interop.Elementary.elm_layout_freeze(RealHandle);
@@ -105,8 +113,9 @@ namespace ElmSharp
         /// Thaws the Elementary object.
         /// If sucessives freezes were done, an equal number of thaws will be required.
         /// </summary>
-        /// <returns>The frozen state or 0 if the object is not frozen or on error.</returns>
+        /// <returns>The frozen state, or 0 if the object is not frozen or on error.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Thaw()
         {
             return Interop.Elementary.elm_layout_thaw(RealHandle);
@@ -117,35 +126,38 @@ namespace ElmSharp
         /// Manually forces a sizing re-evaluation.
         /// This is useful when the minimum size required by the edje theme of this layout has changed.
         /// The change on the minimum size required by the edje theme is not immediately reported to the elementary layout, so one needs to call this function in order to tell the widget (layout) that it needs to reevaluate its own size.
-        /// The minimum size of the theme is calculated based on minimum size of parts, the size of elements inside containers like box and table, etc.
+        /// The minimum size of the theme is calculated based on the minimum size of parts, the size of elements inside containers like the box and table, etc.
         /// All of this can change due to state changes, and that's when this function should be called.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void Resizing()
         {
             Interop.Elementary.elm_layout_sizing_eval(RealHandle);
         }
 
         /// <summary>
-        /// Request sizing reevaluation, restricted to current width and/or height.
-        /// Useful mostly when there are TEXTBLOCK parts defining the height of the object and nothing else restricting it to a minimum width.Calling this function will restrict the minimum size in the Edje calculation to whatever size it the layout has at the moment.
+        /// Requests sizing re-evaluation, restricted to the current width and/or height.
+        /// Useful mostly when there are TEXTBLOCK parts defining the height of an object and nothing else, restricting it to a minimum width. Calling this function will restrict minimum size in the Edje calculation to whatever size the layout has at the moment.
         /// </summary>
-        /// <param name="width">Restrict minimum size ot the current width.</param>
-        /// <param name="height">Restrict minimum size ot the current height.</param>
+        /// <param name="width">Restrict minimum size of the current width.</param>
+        /// <param name="height">Restrict minimum size of the current height.</param>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void Resizing(bool width, bool height)
         {
             Interop.Elementary.elm_layout_sizing_restricted_eval(RealHandle, width, height);
         }
 
         /// <summary>
-        /// Get the edje data from the given layout.
-        /// This function fetches data specified inside the edje theme of this layout.
-        /// This function return NULL if data is not found.
+        /// Gets the edje data from the given layout.
+        /// This function fetches the data specified inside the edje theme of this layout.
+        /// This function returns null if the data is not found.
         /// </summary>
-        /// <param name="key">The data key</param>
-        /// <returns>The data</returns>
+        /// <param name="key">The data key.</param>
+        /// <returns>The data.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public string GetEdjeData(string key)
         {
             return Interop.Elementary.elm_layout_data_get(RealHandle, key);
@@ -154,9 +166,10 @@ namespace ElmSharp
         /// <summary>
         /// Gets the text set in the given part.
         /// </summary>
-        /// <param name="part">The TEXT part to retrieve the text off.</param>
+        /// <param name="part">The text part to retrieve the text off.</param>
         /// <returns></returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override string GetPartText(string part)
         {
             return Interop.Elementary.elm_layout_text_get(RealHandle, part);
@@ -165,24 +178,29 @@ namespace ElmSharp
         /// <summary>
         /// Sets the text set in the given part.
         /// </summary>
-        /// <param name="part">The TEXT part to retrieve the text off.</param>
+        /// <param name="part">The text part to retrieve the text off.</param>
         /// <param name="text">The text to set.</param>
         /// <returns></returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override bool SetPartText(string part, string text)
         {
             return Interop.Elementary.elm_layout_text_set(RealHandle, part, text);
         }
 
         /// <summary>
-        /// Append child to layout box part.
-        /// Once the object is appended, it will become child of the layout.
-        /// Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically.
+        /// Appends a child to the layout box part.
+        /// Once the object is appended, it will become child of the layout.
+        /// Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.
         /// </summary>
-        /// <param name="part">The part</param>
-        /// <param name="child">The Object to append</param>
-        /// <returns>Sucess is true</returns>
+        /// <remarks>
+        /// This will only work if the layout edc have box part.
+        /// </remarks>
+        /// <param name="part">The part.</param>
+        /// <param name="child">The object to append.</param>
+        /// <returns>Success is true.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool BoxAppend(string part, EvasObject child)
         {
             AddChild(child);
@@ -190,14 +208,18 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Prepend child to layout box part.
-        /// Once the object is prepended, it will become child of the layout.
-        /// Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically.
+        /// Prepends a child to the layout box part.
+        /// Once the object is prepended, it will become child of the layout.
+        /// Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.
         /// </summary>
-        /// <param name="part">The part</param>
-        /// <param name="child">The Object to prepend</param>
-        /// <returns>Sucess is true</returns>
+        /// <remarks>
+        /// This will only work if the layout edc have box part.
+        /// </remarks>
+        /// <param name="part">The part.</param>
+        /// <param name="child">The object to prepend.</param>
+        /// <returns>Success is true.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool BoxPrepend(string part, EvasObject child)
         {
             AddChild(child);
@@ -205,27 +227,35 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Remove a child of the given part box.
+        /// Removes a child from the given part box.
         /// The object will be removed from the box part and its lifetime will not be handled by the layout anymore.
         /// </summary>
-        /// <param name="part">The part</param>
-        /// <param name="child">The Object to remove</param>
-        /// <returns>Sucess is true</returns>
+        /// <remarks>
+        /// This will only work if the layout edc have box part.
+        /// </remarks>
+        /// <param name="part">The part.</param>
+        /// <param name="child">The object to remove.</param>
+        /// <returns>Success if true</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool BoxRemove(string part, EvasObject child)
         {
             RemoveChild(child);
-            return Interop.Elementary.elm_layout_box_remove(RealHandle, part, child.Handle) != null;
+            return Interop.Elementary.elm_layout_box_remove(RealHandle, part, child.Handle) != IntPtr.Zero;
         }
 
         /// <summary>
-        /// Remove all children of the given part box.
+        /// Removes all the children from the given part box.
         /// The objects will be removed from the box part and their lifetime will not be handled by the layout anymore.
         /// </summary>
-        /// <param name="part">The part</param>
-        /// <param name="clear">If true, then all objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.</param>
-        /// <returns>Sucess is true</returns>
+        /// <remarks>
+        /// This will only work if the layout edc have box part.
+        /// </remarks>
+        /// <param name="part">The part.</param>
+        /// <param name="clear">If true, then all the objects will be deleted as well, otherwise they will just be removed and will be dangling on the canvas.</param>
+        /// <returns>Success if true.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool BoxRemoveAll(string part, bool clear)
         {
             ClearChildren();
@@ -233,15 +263,19 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Insert child to layout box part at a given position.
-        /// Once the object is inserted, it will become child of the layout.
-        /// Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically.
+        /// Inserts a child to the layout box part at a given position.
+        /// Once the object is inserted, it will become child of the layout.
+        /// Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.
         /// </summary>
-        /// <param name="part">The part</param>
-        /// <param name="child">The child object to insert into box.</param>
+        /// <remarks>
+        /// This will only work if the layout edc have box part.
+        /// </remarks>
+        /// <param name="part">The part.</param>
+        /// <param name="child">The child object to insert into the box.</param>
         /// <param name="position">The numeric position >=0 to insert the child.</param>
-        /// <returns>Sucess is true</returns>
+        /// <returns>Success if true.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool BoxInsertAt(string part, EvasObject child, uint position)
         {
             AddChild(child);
@@ -249,15 +283,19 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Insert child to layout box part before a reference object.
+        /// Inserts a child to the layout box part before a reference object.
         /// Once the object is inserted, it will become child of the layout.
-        /// Its lifetime will be bound to the layout, whenever the layout dies the child will be deleted automatically.
+        /// Its lifetime will be bound to the layout. Whenever the layout dies, the child will be deleted automatically.
         /// </summary>
-        /// <param name="part"></param>
-        /// <param name="child">The child object to insert into box.</param>
-        /// <param name="reference">Another reference object to insert before in box.</param>
-        /// <returns>Sucess is true</returns>
+        /// <remarks>
+        /// This will only work if the layout edc have box part.
+        /// </remarks>
+        /// <param name="part">The part.</param>
+        /// <param name="child">The child object to insert into the box.</param>
+        /// <param name="reference">Another reference object to insert before the box.</param>
+        /// <returns>Success is true.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool BoxInsertBefore(string part, EvasObject child, EvasObject reference)
         {
             AddChild(child);
@@ -267,10 +305,11 @@ namespace ElmSharp
         /// <summary>
         /// Sets the layout content.
         /// </summary>
-        /// <param name="part">The swallow part name in the edje file</param>
+        /// <param name="part">The swallow part name in the edje file.</param>
         /// <param name="content">The child that will be added in this layout object.</param>
-        /// <returns>TRUE on success, FALSE otherwise</returns>
+        /// <returns>TRUE on success, FALSE otherwise.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override bool SetPartContent(string part, EvasObject content)
         {
             return SetPartContent(part, content, false);
@@ -279,11 +318,12 @@ namespace ElmSharp
         /// <summary>
         /// Sets the layout content.
         /// </summary>
-        /// <param name="part">The name of particular part</param>
-        /// <param name="content">The content</param>
+        /// <param name="part">The name of a particular part.</param>
+        /// <param name="content">The content.</param>
         /// <param name="preserveOldContent">true, preserve old content will be unset. false, preserve old content will not be unset.</param>
-        /// <returns>TRUE on success, FALSE otherwise</returns>
+        /// <returns>TRUE on success, FALSE otherwise.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override bool SetPartContent(string part, EvasObject content, bool preserveOldContent)
         {
             if (preserveOldContent)
@@ -297,10 +337,11 @@ namespace ElmSharp
         /// <summary>
         /// Sets the edje group from the elementary theme that is used as a layout.
         /// </summary>
-        /// <param name="klass">The class of the group</param>
-        /// <param name="group">The group</param>
-        /// <param name="style">The style to use</param>
+        /// <param name="klass">The class of the group.</param>
+        /// <param name="group">The group.</param>
+        /// <param name="style">The style to use.</param>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void SetTheme(string klass, string group, string style)
         {
             Interop.Elementary.elm_layout_theme_set(RealHandle, klass, group, style);
@@ -309,26 +350,27 @@ namespace ElmSharp
         /// <summary>
         /// Sets the file that is used as a layout.
         /// </summary>
-        /// <param name="file">The path to the file (edj) that is used as a layout</param>
-        /// <param name="group">The group that the layout belongs to in the edje file</param>
+        /// <param name="file">The path to the file (edje) that is used as a layout.</param>
+        /// <param name="group">The group that the layout belongs to in the edje file.</param>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public void SetFile(string file, string group)
         {
             Interop.Elementary.elm_layout_file_set(RealHandle, file, group);
         }
 
         /// <summary>
-        /// Sets the back ground color of layout
+        /// Sets the background color of a layout.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override Color BackgroundColor
         {
             set
             {
-                if (value.IsDefault && ClassName != null)
+                if (value.IsDefault)
                 {
-                    string part = ClassName.ToLower().Replace("elm_", "") + "/" + "bg";
-                    EdjeObject.DeleteColorClass(part);
+                    Interop.Elementary.elm_object_color_class_del(RealHandle, "bg");
                 }
                 else
                 {
@@ -339,33 +381,36 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Sets the vertical text alignment of layout's text part
+        /// Sets the vertical text alignment of the layout's text part.
         /// </summary>
         /// <remarks>
-        /// API, elm_layout_text_valign_set, is an internal API only in Tizen. Avalilable since Tizen_4.0.
+        /// API, elm_layout_text_valign_set, is an internal API only in Tizen. Available since Tizen_4.0.
         /// </remarks>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public virtual void SetVerticalTextAlignment(string part, double valign)
         {
             Interop.Elementary.elm_layout_text_valign_set(RealHandle, part, valign);
         }
 
         /// <summary>
-        /// Gets the vertical text alignment of layout's text part
+        /// Gets the vertical text alignment of the layout's text part.
         /// </summary>
         /// <remarks>
-        /// API, elm_layout_text_valign_get, is internal API only in Tizen. Avalilable since Tizen_4.0.
+        /// API, elm_layout_text_valign_get, is an internal API only in Tizen. Available since Tizen_4.0.
         /// </remarks>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public virtual double GetVerticalTextAlignment(string part)
         {
             return Interop.Elementary.elm_layout_text_valign_get(RealHandle, part);
         }
 
         /// <summary>
-        /// The callback of Realized Event
+        /// The callback of the Realized Event.
         /// </summary>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         protected override void OnRealized()
         {
             base.OnRealized();
@@ -385,12 +430,13 @@ namespace ElmSharp
         /// <summary>
         /// Sets the content at a part of a given container widget.
         /// </summary>
-        /// <param name="parent">The parent is a given container which will be attached by Layout as a child. It's <see cref="EvasObject"/> type.</param>
-        /// <returns>The new object, otherwise null if it cannot be created</returns>
+        /// <param name="parent">The parent is a given container which will be attached by the layout as a child. It's <see cref="EvasObject"/> type.</param>
+        /// <returns>The new object, otherwise null if it cannot be created.</returns>
         /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         protected override IntPtr CreateHandle(EvasObject parent)
         {
             return Interop.Elementary.elm_layout_add(parent.Handle);
         }
     }
-}
\ No newline at end of file
+}